Short Code Attributes

New home Forums Pro Add-on Short Code Attributes

Tagged: , ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #17307

    Are there any plans to implement shortcode tags as follows?

    marker title
    marker description
    marker icon
    allow directions
    more info link

    I believe these would be helpful for custom page meta data.

    Also, do you have a shortcode tutorial available?

    Nick Duncan

    Hi there.

    Unfortunately I don’t have a shortcode tutorial available at the moment.

    The plugin’s shortcode takes two parameters at the moment:

    [ wpgmza id=’1′ cat=’cat_id’ ]

    The ‘id’ is your map ID. This is mandatory. The category ID is optional 🙂

    Would you mind explaining further what you mean, and how you’d like to see the above shortcodes implemented?



    Basically what I am expanding on is the use of latitude and longitude custom fields.

    I have this code in my template for posts:

    				$typevalue = get_field( 'location', $post->ID );
    						if(empty($typevalue )) {
     						   echo "";
    						} else {
    						 echo	do_shortcode("[wpgmza id='35' lat='$typevalue[lat]' lng='$typevalue[lng]' parent_id='35']");
     						   echo '</p><hr />';

    What this does is pulls the lat and lon from the array and generates the map depending on the type of post that is being displayed.

    I’m using Advance Custom Fields –

    The shortcode produced does exactly as expected, but leaves the marker unclickable. Adding the other attributes to allow for pulling in the infobox features would be helpful.

    basically as follows:

    echo do_shortcode(“[wpgmza id=’35’ lat=’$typevalue[lat]’ lng=’$typevalue[lng]’ title=’$marker_title’ description=’$marker_description’ more_info=’$marker_info’ directions_enable=’true’ parent_id=’35’]”);

    • This reply was modified 7 years, 5 months ago by trekfind. Reason: added information
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Short Code Attributes’ is closed to new replies.