New Landing How can we help? Themeforest Theme Support Dante Change Post pagination to "Previous" and "Next"

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Dante
  • #143881
    TheHomepage
    Member
    Post count: 97

    Hello,

    The standard Dante options is that the pagination on a post page mentions the exact title of the previous post and the exact title of the next post.
    Where in the php code can I change something in order that the pagination
    shows always “previous post” and “next post” instead of the titles of the posts.

    Many thanks in advance !

    #143983
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit single.php file of theme.
    Find this code:-

    <ul class="post-pagination-wrap curved-bar-styling clearfix">
    <li class="prev"><?php next_post_link('%link', __('<i class="ss-navigateleft"></i> <span class="nav-text">%title</span>', 'swiftframework'), FALSE); ?></li>
    <li class="next"><?php previous_post_link('%link', __('<span class="nav-text">%title</span><i class="ss-navigateright"></i>', 'swiftframework'), FALSE); ?></li>
    </ul>

    Change to:-

    <ul class="post-pagination-wrap curved-bar-styling clearfix">
    					<li class="prev"><?php next_post_link('%link', __('<i class="ss-navigateleft"></i> <span class="nav-text">Next Post</span>', 'swiftframework'), FALSE); ?></li>
    					<li class="next"><?php previous_post_link('%link', __('<span class="nav-text">Previous Post</span><i class="ss-navigateright"></i>', 'swiftframework'), FALSE); ?></li>
    </ul>

    Thanks
    Mohammad

    #145690
    TheHomepage
    Member
    Post count: 97

    Many thanks Mohammad. Works great !

    #145694
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome.
    Thanks
    Mohammad

    #241817
    TheHomepage
    Member
    Post count: 97

    Hi Mohammed,

    Your code workes just fine !

    But now i have also an English section on my website.
    As I applied your code in the single.php file with Dutch words, how can I add English words for when people click “English” on my site. Then the pagination should show the words in English and not in Dutch.

    Thanks in advance to help out!

    #241819
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Have you added your custom text within the theme translation strings? Ex:

    __('<span class="nav-text">Your custom text</span><i class="ss-navigateright"></i>', 'swiftframework'), FALSE);

    If so, you will need to re-scan your site using WPML so the strings are updated and the translations will need to be added.

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register