Give wp link pages it’s own template

In your single.php add this example code inside the loop: <?php global $page; if ($page == 1) {?> <div style=”color:red;”>This text should only appear on first page of the post!!!</div> <?php } ?> you can change the div with your thing that you wanted to display only on the first post page..

paginate_links() Change the order of links

You cannot do this with the default paginate_links() functions. Looking at the source code, there are no filters from which you can change the layout as you wish ALTERNATIVE SOLUTIONS Although you cannot do this by default, it doesn’t mean that you cannot get your desired output. Here is a couple of options to explore … Read more

Custom admin page pagination permissions error

I fixed this using another post – Pagination Error on Admin (You do not have sufficient permissions) Basically I needed to changed the $paged argument to $paged = isset( $_REQUEST[‘paged’]) ? max( 1, ( int ) $_REQUEST[‘paged’] ) : 1; and the $pl_args argument to $pl_args[‘base’] = admin_url( ‘admin.php?page=cpd-admin-page&paged=%_%’ );

Later blog post pages give 404 error

First, try rebuilding your permalinks. Go to Settings >> Permalinks and click Save, which will rebuild them. If that doesn’t work, go into your Settings >> Reading >> Blog pages show at most setting and try increasing or decreasing that and see how that changes things. Some themes have a setting that lets you adjust … Read more

Pagination using paginate_links

This is a problem with the paginate_links function and having your default permalink structure set to postname/custom but wanting the pagination to use default link structure. If you look at the code – https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/general-template.php#L0 You can see the following at the top of the paginate_links function // Setting up default values based on the current … Read more