How to set number of posts to display in archive
How to set number of posts to display in archive
How to set number of posts to display in archive
Modify category archive page loop on functions.php
get_queried_object_ID() will return the ID on the page for posts, or get_queried_object() will return the page object containing all its post fields. Alternately, the ID of the blog page is stored in the option page_for_posts, which is internally how get_queried_object gets the ID of the post object to load.
The concept of dividing up a set of posts into a number of “pages” is called Pagination, and is controlled by a number of pagination parameters in a WordPress posts query. The three most relevant (and most commonly used) are: posts_per_page: the number of posts displayed on each page paged: which page of posts is … Read more
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