Problems with running a 2nd installation of WordPress on my domain?

To avoid .htaccess files of WP installations, affect other WP installations, use the following file system structure: hosting_account_folder ┌─────┴─────┐ public_html subdomains ┌────┼────┐ sub1 sub2 sub3 In this scenario, mydomain.com points to hosting_account_folder/public_html, sub1.mydomain.com points to hosting_account_folder/subdomains/sub1, sub2.mydomain.com points to hosting_account_folder/subdomains/sub2, and sub3.mydomain.com points to hosting_account_folder/subdomains/sub3. As you can see, none of WP installations, is a … Read more

Custom Post Types and Broken Permalinks

You need to flush rewrite rules on plugin activation for your custom post type to begin working. register_deactivation_hook( __FILE__, ‘flush_rewrite_rules’ ); register_activation_hook( __FILE__, ‘myplugin_flush_rewrites’ ); function myplugin_flush_rewrites() { // call your CPT registration function here // (it should also be hooked into ‘init’) dwwp_register_post_type(); flush_rewrite_rules(); } You may have noticed it randomly working without having … Read more

Remove all video attachment, both files and post/postmeta from database?

You call wp_delete_attachment passing $attachmentid which is undefined, so it can’t work… Also the $force_delete variable isn’t defined anywhere in your code. Also there is no point in using normal loop in here – you don’t use template tags in this action, so calling the_post is just a waste of resources… add_action( ‘set_user_role’, function( $user_id, … Read more

Flexslider empty slide

I solved issue with putting integer to -1,don’t know really why this helped but if someone get same problem then maybe this will help to him. <?php $i = -1; if (have_posts() ) : while ( have_posts() ) : the_post(); if ($i%2 == 1) echo ‘</li><li>’; ?>