• Hi, how are you? I recently installed the theme Gazette, but needed to make some adjustments. One would be the possbilidade inserting six highlights in the middle of the page, the same is at the top. How would I do that? You would have to create another tag? How I would call this Mansory homepage? My blog is https://painelpolitico.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there!

    It is possible to add an extra featured posts section to the home page, however, that sort of customisation does require familiarity with HTML and basic PHP.

    If you’re fairly comfortable with code, then the first step is for you to set up a child theme.

    The following guides give good introductions to child themes, including steps to set one up:

    You can find the code that defines the featured content at the top of your site’s home page in featured-content.php.

    If you then look at index.php, you’ll find that that file is called with the following piece of code:

    <?php
    	if ( is_home() ) {
    		// Include the featured content template.
    		get_template_part( 'featured-content' );
    	}
    ?>

    The above is “telling” the theme to display featured content if it detects a page is the home.

    If you duplicate index.php in your child theme’s directory, you can either move that code further down the page or use it as a template to create a new featured content area.

    Let me know if that helps you on the right track or if you have any extra questions.

    Thread Starter painelpolitico

    (@painelpolitico)

    So if we add this line of code to “featured-content.php” calling other highlights? I do not want to repeat the same at the top, I would create six others, understand? Calling by another tag

    If you copied the above code exactly then it would display the same six posts that you highlight at the top of the page.

    If you’d like to display different posts then you would need to create some custom HTML and PHP, which goes beyond what we can support on this forum.

    As mentioned above, as a starting point I recommend creating a child theme and then duplicating the parent’s index.php to your child theme’s directory.

    If you’re more comfortable with HTML than PHP, then you could consider manually adding HTML for six new posts to that file. Else, you can see the code in featured-content.php and index.php as a template for how the existing six posts are displayed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Insert other highlights on the theme Gazette’ is closed to new replies.