Hey there!
I use a sticky post on my main page, love it, need it, but, I dont want it to appear when someone does a search, or when someone brings up a tag or category, what can I do to fix it? Any idea? please help :)
Hey there!
I use a sticky post on my main page, love it, need it, but, I dont want it to appear when someone does a search, or when someone brings up a tag or category, what can I do to fix it? Any idea? please help :)
You would need to use a custom query in your search, category & tag templates to exclude the sticky post.
SO i would need to use this
query_posts( array( 'post__not_in' => get_option( 'sticky_posts' ) ) );
somewhere?
In my search, category and tag templates?
dumb question, but where can I find those templates at? :)
SO i would need to use this [...] somewhere?
Yes.
where can I find those templates at
search.php, tag.php and category.php in your theme.
I went to the editor and my theme doesnt have those? it has the following
* Footer
(footer.php)
* Header
(header.php)
* Main Index Template
(index.php)
* Page Template
(page.php)
* Sidebar
(sidebar.php)
* Single Post
(single.php)
* Theme Functions
(functions.php)
Styles
* Stylesheet
(style.css)
Looks like your theme is either:
- using index.php for every post listing page
- or is including templates from a sub-folder.
Does the theme have any sub-folders?
what are sub folders? or where would I find them?
there is a spot that below that says
documentation
for the ehader template it has a drop down list and in the list is
is_(tag)
and
is_(search)
Duplicate index.php and rename it to index.php. Same with tag (tag.php) Normally sticky posts are only shown first on the frontpage, not on category or search pages. Maybe if categories and tags have their own template this will not happen anymore
template hierarchy
Yikes I'm not sure how to do that I'm afraid? and there is no tag.php
sorry, typo.
Duplicate index.php and rename it to index.php. Same with tag (tag.php)
try this:
Duplicate index.php and rename it to category.php. Same with tag (tag.php)
how do i duplicate index.php
i dont have a tag or tag.php
open index.php and save it as category.php and tag.php
i'm just in the back of wordpress. i'm not sure how to do that
ok i went to the cpanel and copied index.php twice and named it category.php and tag.php.
didnt do anything
ok, now I have it copied to the right location and I am seeing category.php and tag.php
now what do I need to change? anyone? getting it :)
This topic has been closed to new replies.