How to share posts (and plugins) between existing site and new, separate dev/test installation?

There are tools available for simplifying the synchronization of databases between multiple WP installations, such as WP Sync DB. As @jdm2112 mentioned, using a copy of the database—versus attempting to use the same database—reduces the risk of development work interfering with the production environment. However, simply making a copy of one site’s WP database is … Read more

How do child themes work?

Child themes are different then parent themes (in this case Twenty Fifteen is the parent theme). Child themes are just copies of your parent themes files. Then you modify those child theme files and they override your parent theme. The advantage of doing this over creating a new theme is that you can update the … Read more

How to add script properly for certain post?

Hardcoding scripts in header.php is a very very bad practice. You should always use proper hooks to enqueue scripts and styles in header. This code will give you some idea on how to do this in proper way. function wpse206834_enqueue_scripts() { if ( is_author() // Checks if Author Archive is Being Displayed || is_category() // … Read more

How to manipulate wordpress template tags’ output

For lots of WordPress template tags, including the_categories() you can’t change the HTML output. Instead, you can use something like get_the_categories() and loop through the results to create your own HTML. <ul id=”whatever” data-attribute=”you” class=”want”> <?php $categories = get_the_category(); if ( ! empty( $categories ) ) : foreach( $categories as $category ) : ?> <li><a … Read more