shortcut issue
-
hi
I am trying to create a shortcode in function.php but the shortcode is not working. I want to use this shortcode on every post as I have already created the custom fields in every post by that name. Trying to connect it dynamically. please help here is my codefunction destination_shortcode()
{
$value = get_post_field( “origin” );
$value1 = get_post_field( “destination” );
return do_shortcode(‘[tp_shortcodes slug=”10011223″ origin=”‘ . $value . ‘” destination=”‘ . $value2 . ‘” type=”xxsdw” subid=””]’);
}
add_shortcode( ‘desti’, ‘destination_shortcode’ );The blog I need help with is: (visible only to logged in users)
-
Hi there,
It looks like you have a self hosted WordPress.org website and not one hosted on WordPress.com.
This is the forum for WordPress.com.
For help with WordPress.org websites please see here:
https://wordpress.org/support/To learn about the difference between the two please see here:
https://en.support.wordpress.com/com-vs-org/Hope it helps.
- The topic ‘shortcut issue’ is closed to new replies.