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 » Center area post/pages »

How to hide one specific category from posts page?


  #1  
Old Jun 3, 2010, 08:52 AM
unelma
 
18 posts · Oct 2009
Hi,

I want to hide category "news" from posts page.

News canīt be displayed in center column or in sidebar.

How I can hide category?

I am using:

Atahualpa 3.4.9
WordPress 2.9.2

Plugins:
Blog in Blog
Widget Logic
  #2  
Old Dec 9, 2010, 11:31 AM
sradhey
 
9 posts · Aug 2010
Were you able to get a reply to this, i am looking for the solutoin too !!
  #3  
Old Dec 9, 2010, 01:12 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
In ATO/Style and Edit Center Column/Content Above the Loop, I entered:
Code:
<?php if (is_front_page() && !is_paged() )
     $posts = query_posts($query_string . '&cat=-15,-80'); ?>
This prevents posts from categories 15 and 80 from appearing in the list of front page posts in the center column.

Then I use the Enhanced Recent Posts plugin multiple times as a sidebar widget, to display a certain number of posts from several categories that I do want to show up in the sidebar. Another plugin, Widget Logic, directs which pages these widgets show up on.
  #4  
Old May 22, 2011, 02:49 PM
bytpep
 
1 posts · May 2011
Thanks paulae for the php code and the offered plugins.
  #5  
Old Jun 3, 2011, 12:12 PM
juanma
 
6 posts · Jun 2011
Hi, I also want to do something like this but I don't know how. I want some categories to appear only as search results. In other words, I don't want some categories to constantly appear in the front-page, but to appear in the front-page only when they are search results.
  #6  
Old Jun 3, 2011, 02:39 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
The Widget Context plugin should help you do that: http://wordpress.org/extend/plugins/widget-context/
  #7  
Old Jun 3, 2011, 03:55 PM
juanma
 
6 posts · Jun 2011
But Widget Context is for Widgets... I don't have problems with Widgets. My problem is with categories... I don't want some of them to appear in the front page unless someone searches for them and appear as a search result.
  #8  
Old Jun 3, 2011, 06:42 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Ah. Sorry. Didn't read it carefully. So you do need the PHP insert as suggested above, but I think Flynn is not able in the new version of Atahualpa to let you just pop it into the center column above the loop as a theme option. You'll have to modify index.php, I think.
  #9  
Old Jun 3, 2011, 07:36 PM
juanma
 
6 posts · Jun 2011
I tried inserting that PHP. The problem of this solution is that the chosen categories NEVER appear in the front page. That's not exactly what I'm looking for. I want some categories not to appear in the front page, except when they are search results (e.g. if you enter to the site, you want see them in the front page, but if you use the search tool, I want them to appear as a search result). Any ideas on how I can achieve that?
  #10  
Old Jun 4, 2011, 04:56 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
You will need to edit index.php and play with what paulae suggested, using the php statement
HTML Code:
<?php if (is_front_page() && !is_paged() )
     $posts = query_posts($query_string . '&cat=-15,-80'); ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Jun 4, 2011 at 08:35 PM.
  #11  
Old Jun 4, 2011, 10:49 AM
juanma
 
6 posts · Jun 2011
What do I have to add to that code to have the excluded categories appearing in the front page as search results? I'm newbie with codes! =(
  #12  
Old Jun 7, 2011, 07:08 PM
sanguango
 
25 posts · May 2011
Hello, I also want to do this and I have the same problem than juanma. Paulae's code didn't work. I also tried installing some plugins (such as, simply exclude) to exclude the category from the front page, but then the category is not shown when you search for it. I'm using the WP Custom Fields Search plugin as search tool. Could that be the problem? juggledad, what do you mean by playing with what paulae suggested? Thanks to both!
  #13  
Old Jun 9, 2011, 10:36 AM
sanguango
 
25 posts · May 2011
Some help with this please?
  #14  
Old Jun 21, 2011, 09:27 AM
sanguango
 
25 posts · May 2011
Hi guys, I still have this problem and I don't know how to resolve it. I've been looking on the forum and the Internet, I've tried different plugins, but I can't find the answer... Could anyone please give me a hand with this?
  #15  
Old Jun 21, 2011, 10:13 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
sanguango - You haven't provided enough information to give you any help
What version of Atahualpa and WP?
What is the URL?
Do you have all BUGFIX's for your version applied? (they can be found in the 'New Version & Updates' forum and sub forum)
--if not, apply them before we go any further and re-test
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #16  
Old Jun 26, 2011, 09:57 PM
JimTrail's Avatar
JimTrail
 
59 posts · Sep 2010
Knoxville, Tennessee
Thanks Paulae;

The solution works fine for my web site. It excludes posts in the "Lifestyle ->> Advice" Sections/categories from the front page.

Check it out and see: http://www.iknx.us/

Just a note to the others - you have got to make sure and put Paulae's code above the Loop.

http://codex.wordpress.org/The_Loop

The loop is found in the Atahualpa theme index.php file (not the WordPress index.php found in your root directory).

You can find it here:
/your site/wp-content/themes/atahualpa/index.php
  #17  
Old Jun 30, 2011, 10:28 PM
JimTrail's Avatar
JimTrail
 
59 posts · Sep 2010
Knoxville, Tennessee
Quote:
Originally Posted by STB
Paulae's suggestion stopped working in Ata 3.7
Exactly. In recent versions of Atahualpa you can't insert PHP code in the ATO --> Style & Edit Center Column.

I forgot to mention in my previous post that rather than making the changes in the Style & Edit Center Column section that the changes must be made in the Atahualpa index.php file which resides on the server.
  #18  
Old Jul 14, 2011, 10:05 AM
JimTrail's Avatar
JimTrail
 
59 posts · Sep 2010
Knoxville, Tennessee
I found yet another solution to exclude posts from the front page that I thought ATO users might like to know about. It is the "Simply Exclude" plugin.

http://wordpress.org/extend/plugins/simply-exclude/

I have installed it on my web site. It seems to work pretty good.

I am using the following:

WordPress 3.1.2
Atahualpa 3.6.7
PHP Version 5.2.17

I just installed it yesterday so I am still learning about it. I am just excluding one category.

The plugin also excludes the excluded category from the Recent Posts widget. It also appears to exclude the excluded category from the Older Entries page.
  #19  
Old Feb 9, 2012, 05:55 PM
longnha
 
12 posts · Feb 2012
Quote:
Originally Posted by JimTrail
I found yet another solution to exclude posts from the front page that I thought ATO users might like to know about. It is the "Simply Exclude" plugin.

http://wordpress.org/extend/plugins/simply-exclude/

I have installed it on my web site. It seems to work pretty good.

I am using the following:

WordPress 3.1.2
Atahualpa 3.6.7
PHP Version 5.2.17

I just installed it yesterday so I am still learning about it. I am just excluding one category.

The plugin also excludes the excluded category from the Recent Posts widget. It also appears to exclude the excluded category from the Older Entries page.
Thank you for the plugin suggestion, it work great on Atahualpa 3.7.3.

Here is the site that I exclude "Promotion" from homepage: http://digitalcashpalace.com/

I came across many thread but this is the only one working, thank you very much.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] post-specific header image w/ css insert (page-specific ones work, but not o viewdesigninc Header configuration & styling 10 Oct 1, 2012 04:43 PM
Restrict posts on index to a specific category. amish_geek Center area post/pages 2 Feb 17, 2010 05:13 PM
[SOLVED] On certain page only posts from specific category RijnmondE4 Page & Category Menu Bars 3 Nov 17, 2009 04:13 PM
Hide the footer on a static page while show them on posts olivier2010 Post-Kicker, -Byline & -Footer 1 Nov 2, 2009 07:41 PM
Make specific blog posts with smaller sidebars, leaving main posts intact. Chrism Header configuration & styling 3 Oct 15, 2009 06:22 PM


All times are GMT -6. The time now is 10:17 PM.


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