|
#1
Jun 3, 2010, 08:52 AM
|
|
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
Dec 9, 2010, 11:31 AM
|
|
Were you able to get a reply to this, i am looking for the solutoin too !!
|
#3
Dec 9, 2010, 01:12 PM
|
|
|
|
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
May 22, 2011, 02:49 PM
|
|
Thanks paulae for the php code and the offered plugins.
|
#5
Jun 3, 2011, 12:12 PM
|
|
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.
|
#7
Jun 3, 2011, 03:55 PM
|
|
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
Jun 3, 2011, 06:42 PM
|
|
|
|
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
Jun 3, 2011, 07:36 PM
|
|
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
Jun 4, 2011, 04:56 AM
|
|
|
|
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
Jun 4, 2011, 10:49 AM
|
|
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
Jun 7, 2011, 07:08 PM
|
|
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
Jun 9, 2011, 10:36 AM
|
|
Some help with this please?
|
#14
Jun 21, 2011, 09:27 AM
|
|
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
Jun 21, 2011, 10:13 AM
|
|
|
|
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
Jun 26, 2011, 09:57 PM
|
|
|
|
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
Jun 30, 2011, 10:28 PM
|
|
|
|
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
Jul 14, 2011, 10:05 AM
|
|
|
|
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
Feb 9, 2012, 05:55 PM
|
|
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.
|
|