Last active
November 9, 2022 16:31
-
-
Save dcooney/31c61a40a1591bdba5e8b9b512ac9b9d to your computer and use it in GitHub Desktop.
Revisions
-
dcooney revised this gist
Nov 9, 2022 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,12 @@ if ( ! empty( $categories ) ) { $current_cat = esc_html( $categories[0]->name ); } echo do_shortcode('[ajax_load_more single_post="true" single_post_id="'. get_the_ID() .'" single_post_target=".type-post" post_type="post" single_post_order="query" category="' . $current_cat . '" pause_override="true"]'); ?> OR <?php echo do_shortcode('[ajax_load_more single_post="true" single_post_id="'. get_the_ID() .'" single_post_target=".type-post" post_type="post" single_post_order="query" taxonomy="category" taxonomy_terms="' . $current_cat . '" taxonomy_operator="IN" pause_override="true"]'); ?> ?> -
dcooney created this gist
Nov 9, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ <?php $categories = get_the_category(); if ( ! empty( $categories ) ) { $current_cat = esc_html( $categories[0]->name ); } echo do_shortcode('[ajax_load_more single_post="true" single_post_id="'. get_the_ID() .'" single_post_target=".type-post" post_type="post" single_post_order="query" category="' . $current_cat .'" pause_override="true"]'); ?>