WordPress.org

Ready to get started?Download WordPress

Forums

Change Location of Page Numbers for Long Posts? (13 posts)

  1. fkerner
    Member
    Posted 2 years ago #

  2. fonglh
    Member
    Posted 2 years ago #

    You'll have to modify your theme.

    Move the bit of code that generates the page numbers and put it after the code which generates the content.

    What theme are you using? Someone familiar with the theme might be able to give you more specific instructions.

  3. fkerner
    Member
    Posted 2 years ago #

    I am using the MagUp theme. I am unsure what bit of code generates the page numbers.

  4. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

  5. fkerner
    Member
    Posted 2 years ago #

    I was able to change the page numbers to "Previous" and "Next" but I would like to put the links at the bottom of the post instead of at the top. What would be the code to do this?

  6. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    @fonglh already suggested what to do -

    if you need details, paste the full code of index.php (or whatever template does the frontpage) into a http://pastebin.com/ and post the link to it here - how-to

  7. fkerner
    Member
    Posted 2 years ago #

    Thank you, alchy and fong. I figured out which one it was.

    I have successfully moved the "Next" page button to the bottom of the post, but I would like it to be above the "Other Stories You'd Like" (Related Categories Via Posts) plugin and to the right, if possible.

  8. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    if you need details, paste the full code of index.php (or whatever template does the frontpage) into a http://pastebin.com/ and post the link to it here - how-to

    without seeing your code, it will be difficult to suggest any changes.

  9. fkerner
    Member
    Posted 2 years ago #

    http://pastebin.com/EdQjLKAe

    Here is the index.php code. My page numbers are located in the single.php code here:

    http://pastebin.com/8fSXNvP1

  10. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    I would like it to be above the "Other Stories You'd Like" (Related Categories Via Posts) plugin

    not (easily) possible, as those are added directly at the end of the post content by a filter function.

    and to the right

    give a css class to the pages link, for instance by changing this here:

    <?php wp_link_pages( 'after= &next_or_number=next
    &previouspagelink=Previous
    &nextpagelink= Next'); ?>

    to:

    <?php wp_link_pages( 'before=<p class="pages-link">&after=</p> &next_or_number=next
    &previouspagelink=Previous
    &nextpagelink= Next'); ?>

    and by adding this to style.css:

    .pages-link { text-align:right; }

  11. fkerner
    Member
    Posted 2 years ago #

    Where exactly would I add the .pages-link to the style.css?

    http://pastebin.com/cAqZtAN8

  12. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    you can add the new style anywhere in a valid location (i.e. not breaking existing styles)

    for instance in line 318 ;-)

  13. fkerner
    Member
    Posted 2 years ago #

    I added the code to line 318, and it is still showing on the bottom left.

    As for the "Related Posts via Categories" plugin, I will have to find another plugin in order to put the Page navigation directly under the content.

Topic Closed

This topic has been closed to new replies.

About this Topic