Show content only on front page?
<?php if(is_home() && !is_paged()) { ?> http://codex.wordpress.org/Conditional_Tags
<?php if(is_home() && !is_paged()) { ?> http://codex.wordpress.org/Conditional_Tags
Use the following extension to the WP_Query class. The extension only takes your arguments as an array, rather than a string format. You’ll to add individual values for “page_link” for each of your tabs. This should just be a string (“tab1”, “tab2” etc etc) Then you’ll need to use the $my_query->next() and $my_query->prev() to add … Read more
I think the easiest implementation would be to put your infinite scroll in category.php, and then, either using Dashboard -> Settings -> Reading -> Posts per page, or via direct query modification, display one post per page. Otherwise, depending on how you’re implementing the infinite scroll, you could make use of next_post_link() and previous_post_link(), both … Read more
get_query_var(‘paged’) giving same result
Your $paged variable on the first is set in the main query. And there is just one page, because it is a page. The get_posts() calls don’t affect that. So the number of all available pages is never higher than the current page, and you cannot get a next page link. Solution: filter pre_get_posts and … Read more
The plugin author has confirmed on the WordPress Support Forums that posts_per_page only works if the type is set to scroll and not click, see http://wordpress.org/support/topic/posts_per_page-not-having-any-effect?replies=5#post-5058675
nextpage pagination is a bit odd. You will have to parse the post content. This should do it. function get_nth_page($n=0,$content=””) { if (empty($content)) { global $post; $content = $post->post_content; } if (empty($content)) { return false; } $content = str_replace(“\n<!–nextpage–>\n”, ‘<!–nextpage–>’, $content); $content = str_replace(“\n<!–nextpage–>”, ‘<!–nextpage–>’, $content); $content = str_replace(“<!–nextpage–>\n”, ‘<!–nextpage–>’, $content); $pages = explode(‘<!–nextpage–>’, $content); … Read more
First, if you want to load posts outside of the default query for the page, use WP_Query. Calling query_posts should be done only to modify parameters of the default query. The pagination issue stems from calling query_posts, you’re overwriting the page parameter (and all other parameters) by calling it in your template. If you want … Read more
Is “WP SEO” = “WordPress SEO by Yoast”? If so, the plugin has some tags for you: %%page%% – Replaced with the current page number (i.e. page 2 of 4) %%pagetotal%% – Replaced with the current page total %%pagenumber%% – Replaced with the current page number Just look at the bottom of the page wp-admin/admin.php?page=wpseo_titles, … Read more
Instead of the loop at the bottom, use WordPress’s paginate_links(): $pagination = paginate_links(array( ‘total’ => $pages, ‘current’ => $page )); echo $pagination; You can play around with some of https://codex.wordpress.org/Function_Reference/paginate_links to get the appearance the way you want. Specifically, the end_size and mid_size will help you to determine the number of page numbers that show, … Read more