Shortcode on front page with new update

Home Forums Modern Shortcode on front page with new update

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17314

    STAG
    Participant

    Shortcode on front page with new update

    Resolved

    Hey Oliver,

    first of all, thank you for your great work. Love the “old” version of the modern theme and the superb support you gave us all those years.
    Would love to update to the updated version, however I have one small problem trying it out on a local installation.

    As you can see on my website website, I have 2 shortcodes running after the latest blogposts on the front page.
    So far, I am unable to get this working with the updated version.

    I have to admit that I am not a coder, and only got it working with the old version of modern after days of trial and error. However, this was over one year ago and the little knowledge I had I already forgot. Would be great if you could help me replicate this design with the new version of Modern.

    #17317

    Oliver Juhas
    Keymaster

    Hi STAG,

    Thank you, I’m glad you like the theme :)

    I’d say the easiest way for you to add those shortcodes is to add them directly to your front page content and then style the content using custom CSS (that way no PHP coding is required here ;) ):

    .home .content-area {
    	box-shadow: none;
    }
    
    .home .content-area .entry {
    	background: transparent;
    	color: #fff;
    }
    
    .home .content-area .entry-header {
    	display: none;
    }
    
    .home .content-area .entry-content-container {
    	max-width: 100%;
    	padding: 0;
    }

    Also, a little tip for you: you can now control front page sections display and posts count in theme options in Appearance → Customize → Theme Options ;)

    Best regards,

    Oliver Juhas
    WebMan Design

    #17322

    STAG
    Participant

    First of all, thank you once again for your quick and helpful support. Pls check your paypal ;)

    Also, a little tip for you: you can now control front page sections display and posts count in theme options in Appearance → Customize → Theme Options ;)

    I have no idea what you want to tell me with that :D

    Slowely but surely the local installation of the new theme is getting where I want it, but I have some more (stupid?) questions.

    1) The content on pages / posts isn’t very wide. Is that by design or did I screw up updating the theme?

    2) How do I get rid of that Blog heading? I read on the manual

    If you are displaying blog on your website homepage, an intro text is displayed over the intro image. You can set this intro text in Appearance » Customize » Theme Options » Texts » “Default blog intro text”.

    but a) this option isn’t available for me (I can only customize the footer text for some reason) and b) it isn’t the description anyways I guess?

    #17332

    Oliver Juhas
    Keymaster

    Hi STAG,

    Thank you very much for donation! I really appreciate it! :)

    1. By Appearance → Customize → Theme Options I meant you can now customize the theme much more then previously. The theme options actually contain a section to control your front page “Blog”, “Portfolio” and “Testimonials” section options, so you can change their display position and change how many posts are displayed in each section.
      I can see you are displaying only 3 blog posts on your front page. Please note that the default is 6, so I think you have probably modified the posts query with custom code to display only 3 posts. You do not need to use the custom code any more :)
    2. The width of the content on pages and posts is basically the same as before. It was narrow even before the theme update and you can preview the theme demo website – this is intentional. It is actually set to the best width to improve readability.
      If you want to widen the post/page content, use custom CSS:

      .entry-content-container {
      	max-width: 100%;
      }

      (Please try using your browser code inspector to determine the CSS you need to modify the theme styles).

    3. That user manual section you mentioned is actually related to blog homepage and the theme options are displayed only if you use blog display on homepage. However, please note that you are using a static front page as your homepage (you can check this in Settings → Reading → Your homepage displays). Anyway, none of those are actually related to your issue, there is no theme option to change that text.
      But you can actually set the text pretty easy (as you can see on theme demo website, there it is called “My journal”). The title of this section is taken from the title of the page you set as “Posts page” in Settings → Reading → Your homepage displays.
      Other than that you can only control it with a custom code in your child theme‘s functions.php file:

      function child_theme_front_page_section_title( $title, $scope, $label ) {
        if ( 'title-front-blog.php' === $scope ) {
          $title = str_replace(
            $label,
            'My custom title here',
            $title
          );
        }
        return $title;
      }
      add_filter( 'wmhook_modern_title', '' );

    Best regards,

    Oliver Juhas
    WebMan Design

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.