Having a prev and next article button on each article but doesnt work

This support request was posted in Flatbase by kouchengfan

Request ID #35835 In Progress
  • 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

    Hi,

    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,
    Juan

    my current version is Version 2.0.1. and I didnt install any pagination plugin.

    it 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

    Hi,

    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.

    Hi 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

    Hi,

    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.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server