• I have built a website using the MH Magazine lite theme and use the <!–nextpage–> tag to break up my posts into various pages.

    The result (at the moment) is a block of numbers at the bottom with page numbers – the user has to click the link with the next page number to go to the next page.

    I would like to have NEXT and PREVIOUS buttons instead of or in addition to the page numbers.
    Here is an example of what I mean.

    I am new to WordPress and have very limited knowledge of coding. I have tried a lot of codes on my post and php files in the last 3 days but had no success. It would be great if someone can explain how I can do this step-by-step.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi esuk,

    if you’re not familiar with coding, you might want to hire someone who can do the job for you as this definitely would involve some coding. In case you want to try this by yourself, please don’t do this on your live site as you can easily break your site when modifying PHP code.

    What you could do is create a child theme and then modify the function mh_magazine_lite_paginated_posts() within the file functions.php of your child theme.

    The original function can be found within the theme file /includes/mh-custom-functions.php starting on line 360 (v2.3.1).

    The wp_link_pages() function that handles the pagination within WordPress is documented here and there you can also find examples for possible modifications: Styling Page-Links.

    Thread Starter esuk

    (@esuk)

    Thank you for your reply, MH Themes.

    I love trying new things so would like to give this a go. How can I try this on a non-live site?

    Thank you for the link on how to create a child theme. Could you please explain or guide me to where I can find how to modify the function that you have mentioned.

    How can I try this on a non-live site?

    You could for example set up a local development environment by using tools such as MAMP or XAMPP or set up another WordPress instance on your server.

    Could you please explain or guide me to where I can find how to modify the function that you have mentioned.

    Sorry, we can’t provide free support for custom development, but if you’ve some PHP knowledge, you could have a look at the linked information from the previous post as that contains the information you’ll need (especially the post from the WordPress Codex).

    In case you’re looking for more information about overriding functions within child themes, a good resource can be found here.

    Thread Starter esuk

    (@esuk)

    Thank you again for your response.

    I will have a look at the info and links you have provided to give this a go.

    Is it possible to modify that function to do what I want to do by using Simple Custom CSS – would there be any difference to using a child theme?

    This isn’t about CSS, it’s about modifying PHP code. CSS only is for styling and not for coding functionality.

    https://www.w3schools.com/css/
    https://www.w3schools.com/php/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Next/Previous Buttons instead of page numbers on MH Magazine lite’ is closed to new replies.