Making a archive gallery page for a custom post type which already has an archive page
Making a archive gallery page for a custom post type which already has an archive page
Making a archive gallery page for a custom post type which already has an archive page
I’m not totally sure what you’re asking, but if you’re asking about the template that would be used by the term, it would be taxonomy-slug-term.php. So for your taxonomy, the default template for the taxonomy would be taxonomy-argomento1.php Each of the term archives would use this same template, unless they have a specific template specified. … Read more
If you don’t want to supply your own page templates and using your current code is not a possibility (because of how the loop loops through all the posts) I would recommend prompting the plugin users to select a page on which they want your plugin’s content displayed (as an option on your plugin’s setting … Read more
Seems to me the desire to use that page-builder plugin has resulted in a solution far more complicated, laborious, and convoluted than whatever you’re calling the “long and manual way” 😛 . WordPress itself answers your question. WordPress Philosophy Pages are for static, timeless, and potentially hierarchical content. Plugins abuse that notion sometimes, but never … Read more
In your register_post_type function you set your publicly_queryable and public flags to false. If you don’t make your post_type publicly_queryable and public, the front-end will simply ignore it. Source: developer.wordpress.org
It depends on how your archives.php is designed. You can use built-in wp_get_archives() function to get posts for last 12 months: <?php wp_get_archives( array( ‘type’ => ‘monthly’, ‘limit’ => 12 ) ); as described in the Codex. Or you can modify the WP_Query using ‘date_query’ parameter: <?php $args = array( ‘date_query’ => array( array( ‘after’ … Read more
Assuming post type is my-post-type. We can create a page template with custom query using WP_Query. Let’s say we create template-multier.php with the below code in the root directory of the active theme. <?php /* Template Name: Custom Post Type Archive */ //Custom header stuff here //Custom query for `my-post-type` $args = array( ‘post_type’ => … Read more
Custom template should be archive-gallery.php instead of archive-posttype.php It’s archive-$posttype.php where $posttype is the custom post type slug. WordPress first looks for archive-$posttype.php and if it’s not available then chooses archive.php Update Same for the custom taxonomies also , the flow is: taxonomy-$taxonomy-$term.php –> taxonomy-$taxonomy.php –> taxonomy.php –> archive.php So for gallery_categories custom taxonomy use … Read more
Seems like I just need to set has_archive to a string instead of true with the desired slug, in my case archive/dogs. Then, create a page with the dogs slug and set the desired template to it.
Page 2 has no posts?