How do I set up single sign on for multiple WP installs across the same domain?

Let your blogs share the same user table. In your blogs wp-config.php files add: define(‘CUSTOM_USER_TABLE’, $table_prefix . ‘my_users’); define(‘CUSTOM_USER_META_TABLE’, $table_prefix . ‘my_usermeta’); Important note from Codex: Please note that permissions in the user_meta tables are stored with the table prefix of the site. So in the CUSTOM_USER_META_TABLE one must have entries for each site using … Read more

How to Create Hierarchical Directory for Nation Wide Mental Health Services

First of all, in WordPress here the best option to solve my problem is using Custom Post Types and Custom Taxonomies. To do that, I’ve created a file named “my_custom_posts.php” and put it inside the theme’s root folder. Then I’ve included this file in my “functions.php” using require(‘my_custom_posts.php’); You can also put your custom post … Read more

Multiple domains for multiple single installs

Serve both sites from the same installation. In your wp-config.php include the settings depending on $_SERVER[‘HTTP_HOST’]. Example for a complete wp-config.php: define( ‘DB_HOST’, ‘localhost’ ); define( ‘DB_CHARSET’, ‘utf8’ ); define( ‘DB_COLLATE’, ‘utf8_general_ci’ ); if ( ‘example.net’ === $_SERVER[‘HTTP_HOST’] ) // .net domain include ‘example.net.config.php’; elseif ( ‘example.com’ === $_SERVER[‘HTTP_HOST’] ) // .com domain include ‘example.com.config.php’; … Read more

Can I put my WordPress theme files in another folder?

The answer is yes. Like @Kvvaradha mentioned in his comments. If you put header.php footer.php index.php functions.php style.css must be in /wp-content/themes/your-theme-folder. And other your library, components and includes could be put anywhere that you prefer. But, make sure files and folders structure are flexible. Good luck in your codes 🙂

Custom Post Type Archive in Sub Folder

Unlike page templates, WordPress doesn’t look in subdirectories for post template pages. The base function used for locating such templates is locate_template() (see source), which looks in the root directory of your theme (and parent theme). (On the other hand get_page_templates() searches sub-directory). You can use template_include filter (which filters the absolute path to your … Read more

How do I serve static content on same domain as WordPress

If the files are static HTML, then you only need to be concerned with name collisions for the directory structure. And if you don’t have anything in WordPress that generates /demo/subfolder/ you don’t have to worry about ignoring it – it’s already ignored. I have a sandbox folder that I use for a similar purpose … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)