Disable single post page

Although I’m also curious as to why you’d want to do this, and would probably suggest using a custom post type instead, this would probably work (actually works for any single post type except pages and attachments): add_action( ‘pre_get_posts’, ‘wpse44983_single_post_404’ ); function wpse44983_single_post_404( $query ) { if ( $query->is_main_query() && $query->is_single() ) { $query->is_404 = … Read more

single page site with subpages

To me it’s very simple, but a bit static. You can make a new front-page.php with the structure you mentioned. Then first make some pages (i.e.: About us, Members 1, Contact etc.) in your wp-admin. And use the get_page() function to call different page [using their individual ID] into different zone. Am I right?

Enable infinite scroll on single.php [closed]

Here’s the direction to go, I think: The WP Infinite Scroll plugin works by identifying your page’s navigation and then, I think, loading the next link found there. So instead modifying the query on single.php, I’m now trying to modify the pagination. I’ve tried several pagination functions, such as posts_nav_link() and twentytwelve_content_nav( ‘nav-below’ ), neither … Read more

404 Page Not Found for Only One Post

It is not listed in the Codex but perhaps the word ‘slug’ in the pages URL is a reserved word? Just a wild guess and could be completely wrong. I thought it may be worth mentioning however as others may encounter a similar problem and might be the result of using reserved words. If you … Read more

how load content as pop-up using ajax

If you want to load PHP file through AJAX use the below code. function sendAJAX(){ $(‘#container’).load( “stuff.php”, // url { // json object of data to pass to the page stuff: “all your stuff goes in here…”, moreStuff: “even more stuff” }); console.log(‘sendAJAX’); }; Let me know, In case of any doubts.

Display only entire most recent post on author page?

First, you need to create an author.php file, or edit the one that your theme has, in my case, I did the test with the twentyseventeen and it doesn’t have an author.php file, so I created it. <?php /** * The template for displaying all single posts * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post * * @package WordPress … Read more