Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

Older / Newer links and excluding category


 
Prev Previous Post   Next Post Next
  #1  
Old Feb 20, 2011, 07:30 AM
vCopia's Avatar
vCopia
 
72 posts · Jan 2011
Long Island, NY
Older / Newer links and excluding category

I have the following code inserted Above The Loop in the ATO to exclude category #3 from appearing on the main pages of the web site (or search for 'em, etc.).

PHP Code:
<?php if (is_front_page() && !is_paged() )
$posts query_posts($query_string '&cat=-3'); ?>
Didn't think it through, though, because it does exactly what I asked it to... exclude cat 3 from the front page (only). When I click on the Older / Newer links, category 3 posts reappear. The idea was to create the illusion to visitors that category 3 posts weren't part of the main site, and were only accessible if you clicked the page tab I have set up for them.

After reading another posts herein I tried this code instead:

PHP Code:
<?php
if (is_home() and !(is_paged()) ) {
query_posts("cat=-3");
}
?>
Got the same result - worked on front page, but not older / newer pages. Makes sense.

Figured I either needed to:
  • change is_home or is_front_page to another command,
  • expand that section to include a command that referred to the Older / Newer links, or
  • add another segment of of code identical to the above and replace is_home or is_front_page with a tag that referred to whatever the Older / Newer links are IDed as.

Just know I ain't got it right. Please share any insights you have that'll bring my coding prowess up to speed with my goal so I can resume my spot at the clever table. Thanks.
 

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Older Newer entries tags raddy59 Center area post/pages 1 Jan 16, 2011 11:22 AM
Changing Font size for NEWER/OLDER ENTRIES steven72dragon Page & Category Menu Bars 3 Jul 29, 2010 05:52 PM
Older/Newer Errors LindaMuller Atahualpa 3 Wordpress theme 4 Mar 9, 2010 04:28 AM
NEWER / OLDER orientation not working bseppa Atahualpa 3 Wordpress theme 9 Aug 27, 2009 08:35 AM


All times are GMT -6. The time now is 12:00 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.