Duplicating wordpress install issue
Install BackWPup on your site and export everything as a ZIP file. The developer can import that then locally.
Install BackWPup on your site and export everything as a ZIP file. The developer can import that then locally.
Generally this is a plugin that causes this. Best way is to disable them one by one. Maybe the plugin has a template which is overriding it.
Don’t use query_posts(). Try: <?php $query = new WP_Query(‘orderby=title&order=ASC&posts_per_page=-1’); if ($query->have_posts()) : while ($query->have_posts()) : the_post(); ?>
Look at the docs (please read the docs) for is_taxonomy_hierarchical(). You need to tell it which taxonomy you’re checking: if ( is_taxonomy_hierarchical( ‘my_taxonomy_name’ ) ) { } If you’re template isn’t specific to a taxonomy, and you need to know which taxonomy you’re viewing, use get_queried_object() to figure it out (you were already told how … Read more
Make archive.php template . And read this: Category Templates
Use add_rewrite_rule(). function wpse325663_rewrite_resource_type() { add_rewrite_rule(‘^resources\/(.+)/?’, ‘resources/?type=$matches[1]’, ‘top’); } add_action(‘init’, ‘wpse325663_rewrite_resource_type’); An important note from the codex: Do not forget to flush and regenerate the rewrite rules database after modifying rules. From WordPress Administration Screens, Select Settings -> Permalinks and just click Save Changes without any changes.
The pre_get_posts hook can be used to modify queries before they’re run. You can use $query->set() to set arguments on the WP_Query object, and $query->is_main_query() in the callback to limit your changes to the main query: add_action( ‘pre_get_posts’, function( $query ) { if ( ! is_admin() && $query->is_main_query() ) { $query->set( ‘posts_per_page’, 12 ); } … Read more
From codex – you should be able to use taxonomy-service-category.php template to display service-category posts.
Have you checked the WordPress Template Hierarchy Diagram To get an idea how wordpress choose the tempalte. I’m not sure but according to the WordPress Template Hierarchy, WordPress will choose default archive.php for custom taxonomy if no special template is specified. That means you cannot not have archive-product.php to use with Custom Taxonomy archive. In … Read more
Finally I found a solution. Maybe it could help someone else. In my archive-filme.php I just used the basic loop: <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); get_template_part( ‘content’, get_post_format() ); endwhile; ?> <?php else : ?> <?php get_template_part( ‘content’, ‘none’ ); ?> <?php endif; ?> Now I … Read more