Include Custom Post Types on the Blog Page
Mixes entries from a custom post type into the main blog page and feed alongside regular posts.
Snippet Library
3,040 free snippets from the WPIDE team and the community. Copy the code, or add any snippet to your site in one click with WPIDE.
Mixes entries from a custom post type into the main blog page and feed alongside regular posts.
Lets administrators add ?wpide_query=1 to a front-end URL to print the main query's variables, the SQL it ran and the number of posts found at the bottom of the page.
Cuts long post titles to two lines and excerpts to three lines in blog grids and Query Loop blocks, so cards line up neatly whatever the text length.
Restricts front-end search results to blog posts, leaving out pages and other post types.
When SAVEQUERIES is enabled, lets administrators add ?wpide_queries=1 to a front-end URL to see every SQL query of the page with its time and calling function, slowest first.
Adds an [acf_posts field="featured" value="1"] shortcode that lists posts whose ACF field matches a value, such as featured items or posts for a region.
Records front-end URLs that run more database queries than a limit you set, with the query count and load time, and lists the worst offenders under Tools > Heavy Pages.
Writes a line to the PHP error log for every request that takes longer than a set number of seconds, with the URL, time, memory and query count.
Makes an entire Group, Column or Query Loop card with the class "wpide-card-link" clickable, using the link in its heading, so visitors don't have to hit the small title link.
Shows 20 results per page on search results without changing the blog page.
Adds a "Numbered ranking" style to the Post Template block inside Query Loops, which puts a large 1, 2, 3... next to each post, for "Top 10" and "Most popular" lists.
Shows 20 posts on category, tag and custom taxonomy archives without changing the number on the blog page.
Adds an HTML comment at the bottom of front-end and admin pages with the number of database queries, generation time and peak memory. Visible to administrators only.
Removes the post being viewed from any Query Loop block that has the class "wpide-exclude-current", for "More posts" sections under articles.
Sorts any Query Loop block with the class "wpide-most-commented" by number of comments, for a "Most discussed" list without a plugin.
Limits any Query Loop block with the class "wpide-recent" to posts published in the last 30 days, for "This month" or "Fresh this week" sections.
Limits any Query Loop block with the class "wpide-has-thumbnail" to posts that have a featured image, so image grids never show empty cards.
Shows posts in random order in any Query Loop block with the class "wpide-random-order", for rotating testimonials, team members or featured posts.
Shows only items whose date field (such as an event date) is today or later in any Query Loop block with the class "wpide-upcoming", sorted soonest first.
Adds a [random_posts] shortcode that lists a few random posts, optionally from chosen categories or another post type, without running a slow random database query on every page view.
Stops WPML from printing hreflang tags on page 2+ of archives, search results and URLs with query strings, where the alternates often point at mismatched pages.
Drops the jQuery Migrate compatibility script from public pages. Only use it when your theme and plugins work with current jQuery.
Drops the "All dates" dropdown from post and media lists, saving a slow query on sites with many thousands of posts or files.
Adds Tools > Rewrite Rules, listing every rewrite rule and showing which rule and query a URL path you enter would match, for debugging 404s and custom permalinks.