Theme

How to place custom post type or taxonomy template files in a custom directory
How to place custom post type or taxonomy template files in a custom directory

When developing your own plugin or addon, due to some technical requirements, WordPress template files sometimes need to be placed inside the plugin directory (i.e., not in the theme folder). What is needed for this?

As an example, take the WooCommerce or bbPress plugin. By default, plugin templates are stored inside the plugin folder. For Woo, it’s “/wp-content/plugins/woocommerce/templates”, and for bbPress — “/wp-content/plugins/bbpress/templates/default/bbpress”. This article describes how to partially implement similar functionality, but in a simplified form (we’ll cover full implementation in upcoming posts).

read more...

How to Create a Child Theme in WordPress
How to Create a Child Theme in WordPress

Hello, dear blog readers!

Today, we’ll take a look at a standard topic for most WordPress-related blogs — creating a child theme.

Why might we need to create such a theme:

  1. We need to change the design of specific blog pages without affecting the rest of the theme's functionality.
  2. We need to change the functionality of a specific page — for example, the homepage or the comment form.
  3. We need to add new functionality.

Yes, of course, all of these changes could be made in the current theme — if it was developed by you or built on demand. But if you're using a theme from the WordPress repository, it's better to make changes using a child theme. Because when you modify the parent theme, and then update it, all your changes will be lost.

read more...