• Resolved carolineh

    (@carolineh)


    Hi people, I’m currently putting together a theme that will function as a normal site (hopefully) with the main parts being a blog and an articles archive. I wanted to segregated the articles part and have done this to some extent by putting articles into a different category, created an index page for it and posts that exclude any of the blog content, have created a template for posts, single-3.php.

    But… On the blog index, which is fine, only shows blog articles, when I go to an individual post, single.php, I can’t stop the next and previous links from continuing into the articles posts.

    I can’t seem to find anywhere a way of excluding a certain category from the loop on single.php. Which leads me to think that I have to whole thing set up wrong in the first place. Is there a better way of running wordpress as a CMS, keeping content completely exclusive from each other. My idea was to use categories but think I’m barking up the wrong tree!

    Many Thanks, hope this makes sense, Caroline

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try category templates rather than static pages: Category Templates ? WordPress Codex.

    Thread Starter carolineh

    (@carolineh)

    Hi Songdogtech, thanks for the suggestion. I have tried it out but it leaves me with the same results. I can only see the wanted categories on the right pages, but the previous and next links that are generated inside the loop

    <div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    		</div>

    still display all of the posts, regardless of which category.

    Not really sure where to go from here, any suggestions?
    Thanks for the help so far!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to exclude one category from post links’ is closed to new replies.