ACF | WooCommerce | Theme Development | How to include a /template-part/ that makes use of ACF’s on a custom WooCommerce homepage?

You cannot include template files via URL, which is what get_template_directory_uri() returns. You need to use the server file path, which you get get with get_theme_file_path(): $heroslider = get_theme_file_path( ‘template-parts/hero-slider.php’ ); echo $heroslider; include_once( $heroslider ); However, if you’re including templates (rather than files with function/class definitions), you should use get_template_part() to get the correct … Read more

How to save the Additional CSS in a CSS file and enqueue it

add_action(‘customize_register’, ‘theme_footer_customizer’); function theme_footer_customizer($wp_customize){ // Get upload directory $upload_dir = wp_get_upload_dir(); // Create style file path $style_file_path = sprintf( ‘%1$s/css’, untrailingslashit( $upload_dir[‘basedir’] ) ); // Create directories if they do not exist if( ! file_exists( $style_file_path ) ) { wp_mkdir_p( $style_file_path ); } // Sanitize contents ( probably needs to be sanitized better, maybe with … Read more

Change from all posts to specific categories post on main page?

Your syntax is wrong, change: query_posts( array( ‘post_type’ => array( ‘post’, $include_reviews, $include_screenshots, $include_videos ), ‘paged’ => $paged ) ); to: query_posts( array( ‘tax_query’ => array( array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => array( $include_reviews, $include_screenshots, $include_videos ) )), ‘paged’ => $paged, ‘post_type’ => ‘post’) );