Shortcode and varaible
-
I need some help, this may be a noob question, I am trying to add a string variable into my short code. Here is what I have so far:
$instagram_title = get_post_meta(get_the_ID(), 'instagram_title', true); if(isset($instagram_title) && $instagram_title != "") : echo do_shortcode("[easy-instagram limit=2 caption_hashtags=false caption_char_limit=0 author_text='' thumb_click='thickbox' time_text='' thumb_size=220px tag='" .$instagram_title. "']"); endif;
My ultimate goal is to utilize the “$instagram_title” so that I don’t have to create a ton of widgets for each page in the site.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Shortcode and varaible’ is closed to new replies.