Jump to content
Sign in to follow this  
nowhere73

Features only on certain post

Recommended Posts

nowhere73

I would like to publish features sets only on certain single post pages, on some post pages there should be no feature at all, is this possible?

Share this post


Link to post
Share on other sites
kastelic

Use CSS to hide the sets on pages you don't want. For example:

page-id-123 #feature{display:none;}
or if there's a lot more that don't have it than do, try it more like:
#feature{display:none;}
	page-id-123 #feature{display:block}

Whichever method results in less code.

Share this post


Link to post
Share on other sites
kastelic

Use CSS to hide the sets on pages you don't want. For example:

.page-id-123 #feature{display:none;}
or if there's a lot more that don't have it than do, try it more like:
#feature{display:none;}
	.page-id-123 #feature{display:block}

Whichever method results in less code. You'll find the page-id classes in the body tag for each page/post.

Share this post


Link to post
Share on other sites
nowhere73

Thanks a lot for your answer. It's working for pages but not for post, I think. I added this code to the css: #feature{display:none;} .page-id-2 #feature{display:block} .page-id-457 #feature{display:block} On this page it's now showing (id-2) http://wir-sind-basel.ch/ but not here (id-457) http://wir-sind-basel.ch/ggg-stadtbibliothek-basel/ Maybe you can have an other look, that would be verry kind!

Share this post


Link to post
Share on other sites
kastelic

For posts you need to use

.postid-457
instead of
.page-id-457

Share this post


Link to post
Share on other sites
Sourena

Isn't it just easier to hide it here within the admin? ZVZBN.png


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
nowhere73

Thanks a lot for your help! To Sourena: Yes, your right, but I made a lot of entrys already, and now I want to show the feature only on one post, so it's easyer with CSS for me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×