Can’t link to pages from Home Front Page now. Get 404
Can’t link to pages from Home Front Page now. Get 404
Can’t link to pages from Home Front Page now. Get 404
Your pagination links are wrapped in with this tag <p class=”pagelinks”> so giving them all the same spacing is easy using CSS like so: .pagelinks a { margin: 0 5px !important; } /* override other defined margins */ maybe you want them all centered on the page too: .pagelinks { display:block; text-align:center; } making the … Read more
Your call of wp_link_pages displays navigation immediately because echo argument is set to 1 by default, and it means to echo result. So try to add &echo=0 at the ennd of wp_link_pages call: add_filter (‘the_content’, ‘pagination_after_post’,1); function pagination_after_post($content) { if(is_single()) { $content.= ‘<div class=”pagination”>’ . wp_link_pages(‘before=&after=&next_or_number=next&nextpagelink=Next&previouspagelink=Previous&echo=0’) . ‘</div>’; } return $content; } Read more about … Read more
Do something like this. // your shortcode callback function your_sc_callback($atts,$content) { $content = wp_list_pages(array(‘echo’=>false)).$content; define(‘YOUR_SC_RAN’,true); return $content; } Now, in your theme template after the content prints if (!defined(‘YOUR_SC_RAN’)) { wp_list_pages(); } Or, you could do … function append_list_pages($content) { return $content.wp_list_pages(array(‘echo’=>false)); } add_filter(‘the_content’,’append_list_pages’,100); And your shortcode callback would be … function your_sc_callback($atts,$content) { $content … Read more
I am answering my own question. Here is the javascript that I wrote which works 100% smooth. <script> $(document).on(“scroll mousedown DOMMouseScroll mousewheel keydown”, function (e) { if (e.which > 0 || e.type === “mousedown” || e.type === “mousewheel”) { $(‘html,body’).stop(); } }); pageSize = 1; showPage = function(page) { $(“.comix”).hide(); $(“.comix”).each(function(n) { if (n >= … Read more
You can using redirect_post_location action in the functions.php in your theme. For example: add_action(‘redirect_post_location’, function () { global $post; return ‘http://google.com/search?q=’ . $post->ID; });
Try doing something like wp_link_pages( array(‘before’=>'<button>’, ‘after’=>'</button>’) ); It should work!
So I just found this filter: the_posts https://codex.wordpress.org/Plugin_API/Filter_Reference/the_posts Send it to a function, and the first parameter is the entire post page with the pagebreak. My plan is to run it through regex, delete the first occurence of the <!–nextpage–> and return it. I’ll see if that works
I think I figured it out. Most of WordPress is based on global variables. Even the main loop is pulling a giant global variable. So I guess it’s ok since I’m not modifying the actual values here – just pulling it out. It might not be a bad idea to throw $numpages and $page into … Read more
_wp_link_page() returns a HTML string and not just the URL address of the link. So, if the link’s URL address is http://example.com/blah/2/, then _wp_link_page() would return: <a href=”http://example.com/blah/2/”> ..i.e. it returns the opening a tag for that link. So replace the following: $content = preg_replace(‘/(<img(.+?)\/>)/i’,'<a href=”‘.$link.'”>$1</a>’, $content); ..with this: $content = preg_replace(‘/(<img(.+?)\/>)/i’, $link . ‘$1</a>’, … Read more