Display only my French posts on my homepage
-
Hello,
How can I do to remove my English posts (tagged with English) from my homepage, in order to only keep my French posts.
Thanks a lot for your help.
LorenThe blog I need help with is: (visible only to logged in users)
-
What you would have to do is to assign a unique tag to your french posts and then we can use that to display only the french posts on the main page. The following example will display only the posts with the tag “French”.
.blog .post { display: none; .blog .post.tag-french { display: block !important; } -
Hello,
Thank you for all your answers yesterday!
I’m terribly sorry but this code doesn’t work…Maybe I did something wrong but I can’t see what…
I wanted to use the tag FR, since I use the tag French for other purpose, but the code displays an empty home page…?Here is a post with the tag French
http://wp.me/p88O8g-ox
Here is a post with the tag FR
http://wp.me/p88O8g-diThank you so much for your help
Loren
-
I don’t see the tag “fr” assigned to any of your posts. You need to edit the French posts and add the FR tag to them. Then the code would look like this.
.blog .post { display: none; } .blog .post.tag-fr { display: block !important; } -
Oops, and I see that I forgot an ending curly bracket in my first code posting, so you did nothing wrong.
I also see that you have the fr tag assigned to three posts.
-
-
- The topic ‘Display only my French posts on my homepage’ is closed to new replies.