candnut
Forum Replies Created
-
Ok I’ve google it and i know now what are MS Global Tables. Anyhow if I should skip the location-single.php when styling the format of single location page I still don’t know how should I place placeholders in single-location.php 🙁
@marcus thank you for your help!
I’m not sure that MS Global Tables are. Unfortunetly I’m not that good in php and wordpress.
I have both CPT theme template single-location.php in my theme folder with normal post loop inside (basically as it is in single.php). I’ve location-single.php in my_theme_folder/plugins/events-manager/templates.
I use single-location.php to style the view of the site outside the_content();.
This is how my location-single.php file looks like:
<?php /* * This page displays a single event, called during the em_content() if this is an event page. * You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need. * You can display events however you wish, there are a few variables made available to you: * * $args - the args passed onto EM_Events::output() */ global $EM_Location; ob_start(); *** HERE IS MY NORMAL HTML CODE WITH PLACEHOLDERS *** $content = ob_get_clean(); echo $output = $EM_Location->output($content); ?>However, still no matter what I put in location-single.php it does not overwrite the code that is in settings page under “Single location page format”.
Ok, after hours of trying, i give up. It seems that no matter the plugin does not apply my template file for Locations:
my_theme_folder/plugins/events-manager/templates/location-single.php
I’ve no idea why. It works perfectly for event-single.php. @marcus are you sure it is not a bug?
@sharc did you manage to make it work? I still have troubles with adjusting location-single.php in templates folder in my theme. I did it with event-single.php
What is odd is that adjusting event-sigle.php and location-single.php seems to be pretty much the same, but it just does not work. EM always pick the data from the setting page under “Single location page format” and does not replace it with the code from the template file.
Any advice?