Template part including not working

Your get_template_part call is successful, it’s the file it loads that is broken <?php get_template_part( ‘partials/category’ ); ?> If you swap the contents of that file for this: <p>Hello World</p> Then it will work as expected. The cause of your problem is this: require_once WP_PLUGIN_DIR.’/themename/includes/file1.php’; you should not be including files from other themes directly … Read more

How to hardcode header and footer in WP?

You can always edit header.php and footer.php manually and entering HTML there, just be sure to call appropriate DIVI functions like elegant_description(); elegant_keywords(); elegant_canonical(); do_action( ‘et_head_meta’ ); etc., and WordPress wp_head(); and others. Be warned that DIVI does a lot of tweaking and you must call necessary functions and find which are not necessary, so … Read more

How do I get tags linking to proper pages (/tag/sample-tag -> pages with that tag)

Found it: The posts I’m working with are instances of custom posts, and the default get_posts() function assumes that posts are just, well, posts. So it wasn’t finding them, and was properly returning “none”. Solution: I added some code to my theme’s function.php file, like so: function set_up_theme() { …other stuff function mytheme_pre_get_posts () $query->set(‘post_type’, … Read more