Skip to content

Instantly share code, notes, and snippets.

View thomasfromwood's full-sized avatar

Thomas thomasfromwood

View GitHub Profile
@thomasfromwood
thomasfromwood / wordpress_index_unlimited_posts.php
Created May 10, 2022 14:41
Get unlimited posts on blog page despite of Settings > reading number #wordpress #blog #index
/* ::::::::::::::::::::::::::::::::::::
* Unlimited posts (articles) on blog page
* :::::::::::::::::::::::::::::::::::::
* Set the number of posts per page (post count) unlimited. Must be in functions.php */
function modify_current_query_loop( $query ){
//only if main query, you can also test with $query->is_tax('example-cpt-slug') or $query->is_archive() in the condition to be more accurate to your case
if( $query->is_main_query() ):
@thomasfromwood
thomasfromwood / wordpress_yoast_seo_breadcrumb_append_blog_link_on_category_archive.php
Last active May 10, 2022 14:17 — forked from amboutwe/yoast_seo_breadcrumb_add_woo_shop.php
Example of how to customize the Yoast SEO breadcrumbs #yoast #plugin #wordpress