Viewing 1 replies (of 1 total)
  • Thread Starter Alvaro Gois dos Santos

    (@alvarogois)

    Nevermind, I was not thinking straight…

    If I fetch the meta value it works like a charm. This way I can use a block to populate a Blocksy theme shortcode, never showing the shortcode in the editor.

    <?php
    $category = get_lzb_meta( 'select_category' );
    $number = $attributes[ 'post_count' ];
    
    echo do_shortcode( '[blocksy_posts term_ids="' . $category . '" limit="' . $number . '"]' );
Viewing 1 replies (of 1 total)
  • The topic ‘Is there a simple way to retrieve the term ID?’ is closed to new replies.