Load more by tag
-
Hi there,
I have a shortcode that loads posts based on tag only on tag.php.
However, it doesn’t seem to load anything when the tag slug is in the shortcode.
This is how I’m calling it? It pulls other data through if ‘tag=””‘ is removed.$tag = get_queried_object(); $shortcode = '[ajax_load_more post_type="post" tag=" '. $tag->slug . '" offset="4" posts_per_page="6" pause="true" scroll="false" button_label="Load More Stories"]'; echo do_shortcode($shortcode);
$tag->slug is returning data fine and is being inserted into the shortcode as it shows up in the data-tag attribute on the element.
Any help greatly appreciated!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Load more by tag’ is closed to new replies.