• Resolved JerryPerk

    (@jerryperk)


    I want to identify specific posts to show up in the slider and not have those posts show up in the body of the page.

    So if I have 10 posts, I want to be able to designate (for example) posts 1, 3, and 7 to go in the slider. And only 2,4,5,6,8,9 and 10 would show up in the listing below.

    I don’t know if it can be done by setting a category or post type. Logically, it seems like I could set a particular category or post type and have that excluded/included from the listing but am not sure how exactly that works in the themes, particularly in a child theme.

    I’m hoping it is something already in the theme that I am just missing though.

    I am not much of a coder, though I can usually muddle through and hack in pieces of code as needed.

Viewing 1 replies (of 1 total)
  • Thread Starter JerryPerk

    (@jerryperk)

    I figured it out. And I love wordpress and it’s forums…

    It was simple enough to create a category called ‘featured’ or whatever, then include that category name into the slider $args in the index.php.

    Then further down in the same file, filter that same category out of the post listing (thanks to http://techbrij.com/exclude-posts-by-category-name-from-home-page-in-wordpress for providing a nice little piece to use category name instead of category id on the exclusion.

    And to preserve the template, I already had a template child I dropped the new index.php into the child folder and it works.

Viewing 1 replies (of 1 total)

The topic ‘separating posts in slider from posts in body’ is closed to new replies.