WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
Looking at the class and function you’re using, this method is a little problematic: public function buildPostArgs( $slug, $singular=”Post”, $plural=”Posts”, $args = array() ) { $args = wp_parse_args($args, $this->postDefaults); $args[‘rewrite’][‘slug’] = $slug; $args[‘labels’] = $this->buildPostLabels($singular, $plural); return $args; } If we ignore your problem, $args[‘rewrite’][‘slug’] is going to generate a PHP warning if you set … Read more
Add custom display condition to Elementor Theme Builder for custom taxonomy children, grandchildren, and great-grandchildren
You can try this SO question Pagination when using wp_query? Notice that their example uses the $query variable for the WP_Query instance, while your code uses $the_query. Also notice that they use paged property in the array that is being passed into WP_Query
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.