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 the way the content is rendered by Wordpress.
As you can see the text of 'nextpagelink' changes depending on the slide #.
I want the shortcode to reflect that.
Here is the schematic of what I am looking to do:
Both 'BEGIN' buttons link to the 2nd slide.
This is what I am currently working on:
function nextpage_shortcode( $atts ) { wp_link_pages( array(
'before' => '<div id="slideshow">',
'after' => '</div>',
'next_or_number' => 'next',
'nextpagelink' => ( get_query_var('page') < 2 ) ? '<span id="next"> BEGIN </span>' : '<span id="next"> NEXT </span>' ) );
return ['nextpagelink'];
} add_shortcode( 'nextpage_short', 'nextpage_shortcode' );
Its works somewhat.
Its posts the 'nextpagelink' button above content, but not inside the content.
Not sure how to proceed.
Please help!