Having a prev and next article button on each article but doesnt work
This support request was posted in Flatbase by kouchengfan
- kouchengfan January 12, 2018 at 5:36 am
Hi there,
I am trying to make a prev and next article within same category button at the bottom of each article but it just doesnt work.
I have tried this but it doesnt work.
<?php next_post_link( '%link', 'Next post in category', TRUE ); ?>
But when i get rid of the third parameter like below code, it work ! So I think it must be something wrong with the third parameter.
<?php next_post_link( '%link', 'Next post in category' ); ?>
Do you guys have any ideas? Thank you for your help in advance !!
Juanfra Aldasoro January 12, 2018 at 1:17 pmHi,
Thank you for writing. I hope you are doing well.
What version of Flatbase are you currently using? Are you using any pagination plugin?
Best,
Juankouchengfan January 12, 2018 at 10:55 pmmy current version is Version 2.0.1. and I didnt install any pagination plugin.
kouchengfan January 14, 2018 at 10:19 pmit seems that there is a new category system with Flatbase that does not inherit from the WordPress one. So the next_post_link() function doesnt work.
Juanfra Aldasoro January 15, 2018 at 2:35 pmHi,
Thanks for the follow-up. Perhaps the WordPress function was updated, would you please try to set the taxonomy parameter to ‘article-category’? (which is the taxonomy used for articles) And also use the true flag lowercased?
Best,
Juan.kouchengfan January 16, 2018 at 2:00 amHi Juan,
It work after setting the taxonomy parameter to ‘article-category’. Thank you.
Also, I just wondering how can I change the order on taxonomy article category? The current order is asc and I would like to make it desc.
I have installed Post Types Order plugin as recommended but it only works on the front page not the taxonomy article category.
Thank you for your help in advance.
Juanfra Aldasoro January 16, 2018 at 1:46 pmHi,
Thanks for the follow-up.
I’m glad it worked 🙂
With regards to the order, Post type archives are ordered by date, descending by default. You can try by adding some code like this one in your flatbase/functions.php file:
Best,
Juan.
You must be logged in to reply to this topic.