More posts section

Mauer Themes Support Storyteller More posts section

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #262

    Hello support,

    How i can exclude one category from “more posts” section in bottom of all posts (single)

    I want to disable category: homecat showing here >

    Thanks in advance!



    To exclude a category from the ‘More posts’ section you need to modify the query by which it’s being formed in single.php (the $args array around line 62). Here are the possible category parameters described in the Codex.

    So, for instance, to exclude a category with the id of 20 you would do the following:

    $args = array(
     'post_type' => 'post',
     'post__not_in' => array(get_the_ID()),
     'posts_per_page' => 2,
     'category__not_in' => array( 20 ),

    Please mind that it’s best to perform such modifications in a child theme, so that they do not get overwritten during a theme update.


    Hello Sir,

    Yeah, that works pretty good. Thank you very much.

    I have one more question. When I added your template (demo content) i got homepage with shortcodes (i think occurs to layout i choose> 2 columns or 3 columns grid…). But I removed them. Is there anywhere where I can find all shortcodes I can use to build home page or it is a fixed layout, if you understand me?



    I’m glad it worked out for you.

    As for the shortcodes, there are no shortcodes created by this theme. What you saw might have been the [gallery] shortcode (which comes with WordPress) or shortcodes created in your content by a previous theme.


    To be honest, im not sure what I saw. Thank you again for your time and help!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘More posts section’ is closed to new replies.