How to call a certain object/menubar in a PHP file
Since noone responded, here’s my solution: I copied my menubar from header.php into a new file called menubar.php and called that file with include(“menubar.php”);
Since noone responded, here’s my solution: I copied my menubar from header.php into a new file called menubar.php and called that file with include(“menubar.php”);
Theme templates are inherently not engineered to play well with plugins. As far as I remember there is still no clean and neat solution to shipping template in a plugin and have arbitrary theme pick it up. There are some libraries, such as Gamajo Template Loader, that implement shipping templates in the plugin and allowing … Read more
Show child theme for users on specific IP
I think you are using brand taxonomy for the post type product. You should create a file taxonomy-brand.php in your theme directory to display whatever you want in this page. You need not to create page template with this name, only create a file with this name in your theme. If you create any page … Read more
Parent to another Custom Post Type – Template files not being recognized
The WordPress doesn’t operate with concept of partial content. The content of the post is seen as single block of text/markup, possibly with embedded external elements. Even in latter case that is considered one way flow — content output will process embeds, but embeds aren’t meant to be extracted from content. In your case I … Read more
Usually the format you see in themes are content-{$post_format-term}.php or content-{$pagename}.php, but it is not restricted to this formats. The naming convention can also differ to your liking as long as you keep it out of normal template hierarchy and then use get_template_part to call it correctly. These are not self standing templates, they cannot … Read more
You need get_categories() with an include argument: if (isset($_GET[‘cat’])) { $this_category = get_categories( array( ‘include’ => $_GET[‘cat’] ) ); var_dump($this_category); } You will get an array of stdClass objects containing category data. There are several ways to parse that but this might do: if (isset($_GET[‘cat’])) { $this_category = get_categories( array( ‘include’ => $_GET[‘cat’] ) ); … Read more
You can create a custom template in the theme and give options for each category to select the template. The custom fields for a category can be added using, ‘Advanced Custom fields’ plugin or you can refer this article. Once you do this, you need to edit the ‘category.php’ file, to set the template for … Read more
Custom Homepage As Single Page or Custom Post Type?