0

Just need to get this shortcode included within this PHP working correctly. I need to include it in the last div 'Loc_Pic64'..... ....have tried using echo do_shortcode but have not had any luck

[google-map-v3 shortcodeid="TO_BE_GENERATED" width="124" height="124" zoom="12" maptype="roadmap" mapalign="center" directionhint="false" language="default" poweredby="false" maptypecontrol="true" pancontrol="true" zoomcontrol="true" scalecontrol="true" streetviewcontrol="false" scrollwheelcontrol="false" draggable="true" tiltfourtyfive="false" enablegeolocationmarker="false" enablemarkerclustering="false" addmarkermashup="false" addmarkermashupbubble="false" bubbleautopan="true" distanceunits="km" showbike="false" showtraffic="false" showpanoramio="false"]

<?php
echo " <div id='loc_con'>
<div id='Loc_Pic64'></div>
<div id='Loc_Content'>
<div id='Loc_Name'><b><a href='" . $Loc_Web . "'>" . $Loc_Name . "</a></b></div>
<div id='Loc_Add'><b> $Loc_Add </b></div>
<div id='Loc_Phone'><b> $Loc_Phone </b></div>
<div id='Loc_Hours'><b> $Loc_Hours </b></div>
<div id='Loc_Description'>  $Description </div>
</div>
<div id='Loc_Pic64'></div>
<div id='Loc_Pic64'>

</div>
</div>";}
?> 
2
  • Can you post your tried code with do_shortcode ? Commented Apr 7, 2014 at 5:37
  • Just add "echo do_shortcode(["shortcode"]);" in the gap above... Commented Apr 7, 2014 at 5:56

1 Answer 1

1

Try this,

echo " <div id='loc_con'>
<div id='Loc_Pic64'></div>
<div id='Loc_Content'>
<div id='Loc_Name'><b><a href='" . $Loc_Web . "'>" . $Loc_Name . "</a></b></div>
<div id='Loc_Add'><b> $Loc_Add </b></div>
<div id='Loc_Phone'><b> $Loc_Phone </b></div>
<div id='Loc_Hours'><b> $Loc_Hours </b></div>
<div id='Loc_Description'>  $Description </div>
</div>
<div id='Loc_Pic64'></div>
<div id='Loc_Pic64'>".
do_shortcode(["shortcode"])
."</div>
</div>";
Sign up to request clarification or add additional context in comments.

2 Comments

Found it out; add $map_display = do_shortcode("[shortcode]"); before the echo command, then just add $map_display between the div tags.
I just updated, it was semi-colon which causing the issue. The update answer will work too.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.