Recent Post Title Size

Hello!

I was wondering how I could make the title “Recent Posts” smaller?
I would like it to be the same size as “Related Products” in my shop. If you scroll to the bottom, you can see the size I’m referring to:

Versus this:

Thanks so much :slight_smile:

  • Nadia

Hello Nadia,

Thanks for writing in!

I have checked your site and I could not find the page or section with the “Recent Posts” title in it. I would recommend that you edit the page and make sure to us H2 as the tag for the Recent Posts title. This should be possible if you are using headline element.

Hope this helps.

Hi!!

It’s not an H2 element. I added the “Recent Posts” code under the functions.php file, just like in this post: https://theme.co/apex/forum/t/recent-posts-where-to-add-the-code/63039/5

Any advice would be super helpful!
Thanks :slight_smile:

Hey Nadia,

You may update the php code and use this:

// Recent Posts below the post content - Single page only.
// =============================================================================

add_action( "x_after_the_content_end", "add_post_shortcode" );

function add_post_shortcode() {
    if( is_singular( 'post' ) ){
        echo '<h2 class="recent_post_title">Recent Posts</h2>';
        echo do_shortcode('[recent_posts count="2"]');
    }
}
// =============================================================================

And then please add the following CSS code in the X > Theme Options > Global CSS (http://prntscr.com/evui3r)

h2.recent_post_title {
   margin: 0 0 0.5em;
   font-size: 200%;
}

We would love to know if this has worked for you. Thank you.

Yea, that worked! Looks a lot better now.

Thank you so much !! :slight_smile:

We are delighted to assist you with this.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.