Can wordpress run in root of existing php site with no theme on index.php but all other WP posts/pages?

Short Answer No. The Reason If you take a look at the .htaccess file in the root of your WordPress installation, you will notice these few lines generated by WordPress ( If you have pretty permalink enabled ): # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond … Read more

How can I show the actual content of Posts page because the_content() is showing all blog content?

You can use: get_queried_object_id() to get the ID of the static posts Page. Alternatively, you may also use get_option( ‘page_for_posts’ ). $post_id = get_queried_object_id(); //$post_id = get_option( ‘page_for_posts’ ); // you should use the above on the blog page $content = get_the_content( null, false, $post_id ); get_queried_object() to get the full data of the static … Read more

Non-wordpress subdomains on Multisite Installation

The WP Codex gives two examples of excluding a subdirectory from multisite’s control. .htaccess method (as Karthik noted) Virtual host method .htaccess Being sure to call the sub rewrite BEFORE the rewrite of ww.domain.com to domain.com RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} subdomain.domain.com RewriteCond %{REQUEST_URI} !subdomain/ RewriteRule ^(.*)$ subdomain/$1 [L] # Rewrite http://www.domain.com to domain.com … Read more

How to stop subdirectory wordpress install adding head elemets to entire site?

This is because you call get_header() which already require your theme header.php, in which the meta tags are defined. You should learn how to use get_header() in the WordPress Codex To summarize: You must rename your wp-blog-header.php file to header-blog.php and place it in your wordpress theme directory. Then you can require it using this … Read more

Close a wordpress blog – keep site as it is but prevent hacks

Why not just disable comments and registration? This comes to mind also: (Redirect all requests to login page or admin pages to homepage. A little irreversible.) $currentURL = $_SERVER[“HTTP_HOST”] . $_SERVER[“REQUEST_URI”]; if (strpos($currentURL, ‘wp-admin’ ) or strpos($currentURL, ‘wp-login’ )) { header( ‘Location: ‘.site_url() ); } Caution: this stops you from logging in also. Edit: And … Read more