I need to use Geo Mashup plugin with the theme so I’m trying to place the following code into single page template:
<?php echo GeoMashup::map( 'map_content=single&auto_info_open=false&static=true&map_type=G_NORMAL_MAP&width=690&height=260&zoom=18&add_map_type_control=true&add_overview_control=true&open_object_id=' .
get_the_ID() ); ?>
https://github.com/cyberhobo/wordpress-geo-mashup/wiki/Tag-Reference
I imported a cloud template. Edited and renamed it to My Template. Using TagDiv Composer tried adding the code via “Raw HTML” box. Then went to Newspaper > Theme Panel > Post Settings > Default Post Template (site wide) and activated My Template there, but naturally the php code for raw html box didn’t work.
Any way I can edit my single-post template to include this GeoMashup code?
-
This topic was modified 7 years by
nervusvagus.
I found a solution for this issue here:
https://forum.tagdiv.com/topic/theme-panel-not-work-2/
I had to go to /wp-content/plugins/td-composer/legacy/Newspaper/parts/single/
and modify loop-single-1.php with the php code.
Is it possible to do this with cloud templates, some of the single cloud templates are amazing. The Single Post cloud template I chose “Review Template 1” is there a way to get a hold of the raw php files of these?
Hi,
PHP code may not work in the raw HTML element, in the files it should work. But cloud templates don’t have PHP files unfortunately, like default templates do.
If that plugin would provide a shortcode, then you could enter that shortcode in the template itself, in a column text element. That element supports shortcodes, so this would be a solution, if the plugin allows it.
Thanks
Thank you, the plugin provides shortcodes but when I use the shortcode even though the map is displayed on the page it doesnt show the location for the post its just a blank map. When I edit the template at /wp-content/plugins/td-composer/legacy/Newspaper/parts/single/ and choose that template everything seems to work fine.
Should work by shortcode, works for most plugins. I haven’t tested that plugin exactly however, maybe there are problems like you mention (could be a CSS issue or maybe there are errors).
You could edit the template files like you did, if that works properly. In a child theme it isn’t possible anymore unfortunately. Only the default post template remained in the theme and can still be modified in a child theme.