• Resolved pauti12

    (@pauti12)


    Hi,
    Is there a way to get the current category on the shortcode? Because I would like to add a Load More to the WP Archive page (category filter) and instead of creating one shortcode to each category I would like to create just one shortcode that gets the current category. Is that possible?

    Example:
    <?php echo do_shortcode(‘[ajax_load_more post_type=”post” posts_per_page=”5″ category=”CURRENT CATEGORY” offset=”10″‘); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get the current category with shortcode’ is closed to new replies.