1

this is my code :

  add_shortcode( 'vc_post_cat', 'vc_post_cat_render' );
  function vc_post_cat_render() {
    $postId = '{{ post_data:ID }}';
   $cat = get_the_category($postId);
  }

but postId is not working for function.

1 Answer 1

0

I hope this will help

add_shortcode( 'vc_gitem_custom_post_excerpt', 'vc_gitem_custom_post_excerpt_render' );
function vc_gitem_custom_post_excerpt_render( $atts )
{
  return '{{ excerpt_length:' . http_build_query( (array) $atts ) . ' }}';
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.