Custom Post Types, slug, archive and SEO plugins

I don’t know what content you want to insert in your archive page, but you can always use the file “archive-friends.php” as you can see in the Template Hierarchy to loop your “friends” post type. Then, to customize the SEO, I recommend you the plugin WordPress SEO by Yoast because it has a strong compatibility … Read more

Version Control: Entire site or just pieces?

There’s no set best practice, as each model fits different work processes. One Repository If you’re only managing a single site with a single set of plugins/themes then a single repository makes sense. Or if you’re managing multiple sites that use the same set of plugins/themes. Multiple Repositories This is my personal preference. Keep WordPress … Read more

Remote upload file to server B

Try adding die(‘message’); and use that to debug where it fails. Also try and use ftp://external-server.com as opposed to just external-server.com. Also make sure you use your FTP password. And try it on active mode as opposed to passive mode. When I was trying to upload by FTP that’s what I had to do. Also … Read more

Post/Page Preview Template

You could use the conditional is_preview() to add a bit of extra content. For instance, you could put this at the very top of your single.php right after the header is called – or you could put it in your header.php file if you want it shown at the very top of the page: <?php … Read more

Find out who deleted a page or post?

By default, no, WordPress doesn’t keep track of who changes post statuses (at least that I can see). you can hook into transition_post_status and log the user id. add_action( ‘transition_post_status’, ‘wwm_transition_post_status’, 10, 3 ); function wwm_transition_post_status( $new_status, $old_status, $post ) { if ( ‘trash’ == $new_status ) { $uid = get_current_user_id(); //somehow or another log … Read more

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