Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Adding variable into do_shortcode WordPress


I am trying to add variable $current_cat into the do_shortcode, but cannot get it to work, can anyone help me?

<?php $current_cat = get_queried_object_id();
echo do_shortcode('[ajax_load_more id="7611030286" loading_style="light-grey" container_type="div" post_type="post" posts_per_page="6" category="'. $current_cat .'" scroll="false" transition_container="false" button_label="More Articles"]'); ?>

Answers (0)

No answers yet.