ACF Pro Accessing fields on a Custom Post Type
Try this code <?php $image = get_field(‘team_members_page_image’, ‘option’); ?> <div class=”post-hero-image archive-header” style=”background-image: url(‘<?php echo $image ?>’)”>
Try this code <?php $image = get_field(‘team_members_page_image’, ‘option’); ?> <div class=”post-hero-image archive-header” style=”background-image: url(‘<?php echo $image ?>’)”>
Well, first of all, you are not doing anything with the $term variable. You are querying it, but then it sits there, waiting to be picked up. Try this code in your taxonomy template, called taxonomy-hardware_category.php: // prepare the variables for the query $tax = get_query_var(‘taxonomy’); $term = get_query_var(‘term’); // Setup the loop, build the … Read more
Shortcodes not working in custom page
As @Jacob Peattie says, pagination is what’s causing this, and probably what you want to add if you will have more posts over time. If you want you can disable pagination for archive pages easily with this in your functions.php: function wpse_disable_pagination( $query ) { if (is_archive()) { $query->set(‘nopaging’, 1 ); } } add_action( ‘pre_get_posts’, … Read more
I dont know if it is what is being ask, but possibly it is. if we add the woocommerce theme support on function.php like so add_theme_support( ‘woocommerce’ ); we can copy the archive-product.php from the woocommerce plugin to our theme, than we can edit and use that file, the archive-product.php set the page that show … Read more
setting offset to category number in archive page
I can’t go to the page archive-{post_type}.php
How To Get the Correct Character length of the Category Archives Page Title
A very usefull plugin when developping is Query Monitor In the template section, you’ll be able to find the template or template part used.
I noticed that you’re using is_category() in your function, which means you’re targetting the default/core category taxonomy and not a custom taxonomy, hence you should instead use the category_template hook. E.g. add_filter( ‘category_template’, ‘load_new_custom_tax_template’); function load_new_custom_tax_template ($tax_template) { // I don’t check for is_category() because we’re using the category_template filter. return dirname( __FILE__ ) . … Read more