Is anyone there…?
Well, I think that if WordPress team still bet on the sticky post feature, here is an interesting situation to consider. I know, I’ve ‘googled’ for days and tried to adapt the common solutions to the common problems related to sticky posts (not a wide range, a lot of blogs repeats the same few ideas and solutions), and It seems that the sticky feature has not been fully tested, it must get better at compatibility with other WP functions…
There is no doubt it’s a feature that could make WP a platform with a greater potential.
In the meantime, maybe somebody can suggest an ingenious solution or alternative way I cannot see now…
I think you’ll need to exclude the sticky posts via a custom query>
This is a problem w/ sticky posts that I have also experienced. There are a couple of ways to work around it.
1) If you have LOTS of other posts in your blog, just set the publishing date to your sticky posts to be WAY back in the beginning of your blog. Then, they won’t really get in the way of previous/next navigation. This is a hacky and inelegant solution, but might tide you over.
2) Rather than using sticky posts for category descriptions, you can use the “Category description field”. You can put whatever HTML you want in there, and it will show up IF your theme displays the category description.
(sorry again for my poor english)
Thanks, I appreciate your help, really. Unfortunately, I’ve tried yet your suggestion, via a custom query, with no luck. With a lot of variants (wp query, myquery, inside and outside the loop, with $args like post_not_in, etc.) Don’t work.
You’re my angel!! I think you really suggest an ingenious solution, with a lot of sense! Changing the publishing date of the post… I like it! Not very orthodox, neither perfect, but probably efficient enough. I hope… If the sticky posts goes to the beginning of the navigation, not in the middle, I will feel better.
I’ve thinked yet about something similar, but without an exact knowledge, no concisely.
I’ve also thinked yet about the second solution, more concisely, but -call me stubborn if you want-, I didn’t want to renounce the use of the wp sticky functionality.
Well, I don’t know exactly how to change the publishing date of a post, but I’m sure I will find it through a google search, when I have the time.
Thank you very much!
P.S. to WordPress developers: please, when you have the time, make the sticky function a little more compatible with the rest of functions… Anyway, I still think WP is a great platform!
It seems that this don’t work. I got too much excited hastily.
Nevermind, I hope the WordPress team will solve this one day…
Maybe I will investigate a bit. Curiosly I’ve observed the fact that previous_post_link shows the link to the first sticky post at the end of navigation, when viewing the last post. However, next_post_link does not show this same first sticky post at the beginning of navigation, when viewing the first post (I mean inside the sequence of the same category or subcategory).
All this seems to be related to some lines in the file wp-includes/link-template.php. I’m going to ‘googling’ again about the functions inside that file, maybe a little hack is possible…
- The topic ‘Exclude sticky post from navigation in single.php’ is closed to new replies.