Questions tagged [wp-link-pages]
The wp-link-pages tag has no usage guidance.
62 questions
0
votes
0
answers
158
views
Help to modify wp_link_pages()
My site has the Newspaper theme by tagDiv, which installs two necessary plugins to make things work better. These plugins are Composer and Standard Pack.
I'm trying to modify the default wp_link_pages(...
0
votes
1
answer
392
views
Custom wp_link_pages for paginated posts | Next page randomly
Does anyone know if it's possible to change wp_link_pages,
I want to change the order of the pages
Example :
i have an Post consisting of 5 pages
i want when you click on "Next page", it ...
0
votes
0
answers
52
views
How do I change page numbers to words?
So I need to change the page numbers to word but I can't figures out how to do it. Right now I'm using page breaks but it always looks like the example below no matter how many times I try to fix it, ...
0
votes
2
answers
301
views
Removing menus from users other than the administrator
I want to remove some of the menu links from all users except the administrator. How can I do it?
1
vote
0
answers
300
views
wp_trim_words() does not work with my code Am I doing any mistake in my code?
n my WordPress website, I want to show a short text of each blog_post on the custom blog template. I want to show a Read More button with a link to the post at the end so a user can click on that link ...
0
votes
1
answer
481
views
How to change the paginated posts link class?
When using wp_link_pages() to display article pagination, how do I modify the linked class?
I want to use different classes to set the previous/next link style.
Thanks in advance!
Wp_link_pages() ...
0
votes
1
answer
197
views
wp_link_pages shortcode for 'nextpagelink'
I want 'nextpagelink' shortcode [nextpage_shortcode] that I can place inside content.
I've seen threads where they say that you can't place anything related to the wp_link_pages inside content due to ...
1
vote
1
answer
156
views
Post Pagination Customization (wp_link_pages) Editing Navigation
I want to create a post pagination where there is only ONE 'nextpagelink' button per page.
However, I want the text inside the the first 'nextpagelink' to say "WELCOME".
And I want the text inside ...
1
vote
1
answer
135
views
How do I detect which page I'm on within a paginated post?
I'm using wp_link_pages() to paginate a post. I want to show something below the post content only on the first page of the post. Naturally I thought I'd use get_query_var('paged') to get the page ...
2
votes
1
answer
116
views
How to insert text between the page numbers? [closed]
Inside my article I use the tag <!--nextpage-->. Now how to insert text between the page numbers. In HTML it should look like this:
<div class="postlink">
<p style="text-align: center;"...
0
votes
1
answer
42
views
Linking images in WordPress Paginated Post
I have a paginated post on WordPress with about 5 pages. I want to set it up so that the images in the content from the previous page automatically link to the following page.
I've used the following ...
0
votes
1
answer
80
views
using globals from wp_link_pages function
I'm following this reference page for
wp_link_pages:https://developer.wordpress.org/reference/functions/wp_link_pages/
In it, 4 global variables are declared: $page, $numpages, $multipage, $more. I'...
0
votes
1
answer
151
views
Override wp_link_pages pagebreak with filter
Is it possible to have conditional pagebreaks?
For instance, if there is a match in the query string, the first page break of a post is ignored, and the user get's to read two posts in a row before ...
0
votes
2
answers
2k
views
How to make the <!--nextpage--> show as a button?
So currently my blog post has a "Pages: Next page" at the bottom of my blog post
by putting <!--nextpage-a-> in the editor where I wanted to stop the first page. Also with the <?php ...
0
votes
1
answer
61
views
Publish and go to page [duplicate]
Can I add a link to "Publish"-button so when it's clicked it publishes new post and direct to another page in same click?
2
votes
1
answer
309
views
Can I add a 'show all pages' link to wp link pages?
I use wp_link_pages to paginate individual pages and posts.
Is there a way I can add to it an extra link which'll show all pages together, on a single page rather than split?
2
votes
0
answers
469
views
Display only the current page number and another numbered page in pagination
I need some help with pagination.
The pagination should only display the current page and another numbered page, like so:
<< | 2 | …3 | >>
At the moment, it shows all page numbers:
<...
0
votes
1
answer
639
views
WordPress post/page pagination (page links) to go back to the first section
I am using the page links: https://codex.wordpress.org/Styling_Page-Links as:
wp_link_pages(array('before'=>'',
'next_or_number'=>'next',
'previouspagelink' => '«',
'nextpagelink'...
2
votes
3
answers
2k
views
When paginating a Page with the <!--nextpage--> tag, how can the 2nd and subsequent page styles be customised?
I want to apply different styles for a second page in single.php or posts. How can I do this?
I have the following code in single.php to split the page in two parts:
<!--nextpage-->
If there ...
0
votes
1
answer
492
views
How to ignore wp_link_pages function?
I've bought a wordpress theme. I want to ignore all wp_link_pages functions from theme files. I will write my custom codes.
Is there any way to do it with functions.php
3
votes
1
answer
436
views
Customizing wp_link_pages
I want to create a pagenation using wp_link_pages that looks like this
Previous 3 of 20 Next
How can this be achieved?
I am using this function btw https://codex.wordpress.org/...
2
votes
2
answers
904
views
wp_link_pages: display current page number only if has multiple page breaks?
I'm trying to build a function to display the current chapter (page) within the single.php file ONLY if there's more than one chapter (page break).
This function will output the chapter # within the ...
3
votes
1
answer
1k
views
the_content and wp_link_pages
Many plugins seem to be adding a filter/action hook to the_content to display related posts, advertisements and such. The problem is I these appear before the post pagination so it the pagination is ...
1
vote
2
answers
4k
views
How to ignore or disable nextpage tag?
I have this site that uses the <!--nextpage--> tag in posts for pagination purposes. I want to disable pagination, but without deleting the tags for the database (maybe they'll want to use them ...
1
vote
1
answer
2k
views
Wordpress wp_link_pages show only next/prev link
I used nextpage to separate a post into multiple page and I don't want to show pagination as 1 2 3 Next, I want to to show Prev Next, below is the code I come up with after reading the wp link pages, ...
6
votes
2
answers
38k
views
How to get a page url by a page id?
I tried to use get_page_link('page-id') and get_permalink('page-id') but the error below occurred.
Fatal error: Call to a member function get_page_permastruct() on null in ...
How can I get a page ...
2
votes
1
answer
220
views
Append a <!--nextpage--> to every post to force additional page link (and static content)
I'm trying to affect either the content or the $post->post_content directly, before the post get read by the wp_link_pages() function, to inject a little bit of static text or javascript after the ...
1
vote
0
answers
344
views
Add query string to wp_link_pages links
I am attempting to add a query string to the output 'Next' and 'Previous' links that are produced from a modified wp_link_pages.
In my functions.php I have:
add_filter('wp_link_pages_args','...
0
votes
1
answer
150
views
Add wp-link-pages to post
I am trying to add wp-link-pages function to my post where I have images split into many pages in that single post. I already have next and prev button whose functionality is written javascript. I ...
1
vote
0
answers
863
views
Adding wp_link_pages to a theme that seems to lack?
I'm using wp-bootstrap as basis to build out a custom site. The wp_link_pages function doesn't seem to work and I'm thinking maybe it's just missing from the theme. I've got a code in a page and the ...
0
votes
2
answers
6k
views
Post Pagination Modifications (wp_link_pages)
I'm looking to modify how Wordpress is showing the pages of my posts. What I currently have is a previous and next page link at the bottom of the post with the following code:
<?php wp_link_pages( ...
1
vote
2
answers
1k
views
add_filter('the_content', '...') stops pagination from working
I have a function (it deals with using preg_replace_callbackto replace Image URLs with URLs/paths to the uploads directory - lets call it replaceImgUrls()) which is then passed into add_filter('...
0
votes
1
answer
2k
views
How to customize wp_link_pages()?
Does anyone know how to customize wp_link_pages() so that <!--nextpage--> will show like "<< previous" and "next >>" links instead of "Pages: 1 2 3 "?
Note:- i used "<!--nextpage-...
0
votes
2
answers
2k
views
query to use to link to taxonomy single page
Hi & thanks in advance to those who could help me sot out he below:
I have customized my home page, using tpl-home.php to show the authors (eg users...) of the most recent posts - nothing ...
4
votes
1
answer
1k
views
Automatically add <!--nextpage--> after X number of paragraphs
Is it possible to automatically add the <!--nextpage--> quicktag after X number of paragraphs?
My client isn't exactly tech savvy so I'm trying to find a way to help them break up their ...
0
votes
1
answer
641
views
alternative to wp_link_pages() that only shows link to last page
I plan to have posts with multiple pages that would receive updates (added pages) over time.
what i want to do is to display the direct link to the last page of the post on the main index.
for ...
1
vote
2
answers
2k
views
Add Unique Classes to Next and Previous in WP_LINK_PAGES
I'm using the below function for wp_link_pages. It can be viewed in use here.
I would like to add a class to the previous link and a class to the next link so they can be styled individually. I'm ...
1
vote
1
answer
1k
views
Only nextpagelink on wp_link_pages
Does someone have a solution to display only the nextpagelink with wp_link_pages in single posts? I've tried different solutions, but none of it worked.
As I reach the last page - wp_link_pages ...
0
votes
3
answers
1k
views
Make wp_link_pages() suitable for Twitter Bootstrap markup
Below there's the Wordpress code found in post-template.php for the wp_link_pages() function - this function generates a page navigation for posts or pages having the content split into multiple pages....
0
votes
1
answer
131
views
WP_LINK_PAGES Generating Unnecessary </p> Tag
This is the current output for my WP_LINK_PAGES, notice the unnecessary </p> tag at the end.
My code for my custom WP_LINK_PAGES can be found here.
<div id="link_wrap"> <span class="...
0
votes
1
answer
55
views
Closing WP_LINK_PAGES DIV ID w/After Argmuent
In my code below I need to close the div "link_wrap" which I created with $args['before'] = '<div id="link_wrap">';
When I try to paste $args['after'] = '</div>'; above return $args; it ...
0
votes
1
answer
183
views
Unable to Change "Pages:" Before WP_LINK_PAGES
Below is a functions.php code for wp_link_pages which allows pagination and previous/next links to be displayed. It also wraps each pagination link in a span class called "classlinks".
I need to ...
0
votes
1
answer
59
views
Adding an Unlinked Space in a Custom Function
This question has been a pain in my side for the last few days.
I am using a function to display page numbers and next/previous links with WP_LINK_PAGES. The code I'm using (below) is a shortened ...
2
votes
1
answer
907
views
Add a Class to Current Page WP_LINK_PAGES
I've noticed WordPress has some illogical differences between wp_link_pages and paginate_links. Specifically, WP_LINK_PAGES does not automatically add a class to the current page like paginate_links ...
0
votes
1
answer
347
views
Remove Spaces From WP_LINK_PAGES
By default, wp_link_pages (the code which allows you to breakup posts into multiple pages) creates spaces between each number. Is there a way to remove these spaces via functions.php?
0
votes
2
answers
449
views
How can I display wp_link_pages before a shortcode, if it is used, or display after content?
I have the following shortcode in my content
[src]<a href="#">Some Link</a>, <a href="#">Some Other Link</a>[/src]
My post structure looks like this:
<?php echo $content; ...
0
votes
1
answer
6k
views
Changing wp_link_pages() to "Next Page" and "Previous Page" buttons?
Currently I am using <!--nextpage--> to split a post into multiple pages, but I would like to change from Pages: 1 2 3 4 to Next Page and Previous Page links similar to what you see on this ...
3
votes
1
answer
3k
views
Check if on last page of paginated post using wp_link_pages
A client of mine reviews products on his site, and wants to display the review criteria and score on the last page of each posts. Typically, there are 3-5 pages per post, and I'm looking for a way to ...
1
vote
0
answers
200
views
Adding range to wp_link_pages()
I have some very long posts, some have more than 50 pages (<!--nextpage-->) and when using wp_link_pages, it give me 50 internal post links, clearly this isn't usable.
How can I add a range to ...
1
vote
0
answers
719
views
Limiting number of visible links displayed with wp_link_pages
I need to extend the wp_link_page function to only show a max of 5 links at a time. What is the best approach to limit the number of links?
In the end i'd like it to look like this: Previous 1 2 3 4 ...