could it be location-single.php doesn’t work because you don’t have location pages to override with formats in your settings page?
you may be mixing things up because you can also do this in your themeroot the normal wp way
Thread Starter
scharc
(@scharc)
i doublechecked right now…
i turned of the override settings for the single location page in the settings and it worked like a charm
when i turn it back on, everything went back to the format i set up in the admin settings page
but nothing so far for location-single.php in my theme folder…
I mixed myself up above! in the theme folder it’s single-location.php
Thread Starter
scharc
(@scharc)
i checked.. and there was no single-location.php in the folder which comes with the plugin…
anyway, i copy-renamed location-single.php … nothing
its just taking the format in the admin panel, not the one in the theme folder
any other things i could check?
single-location.php is WP, not EM – http://codex.wordpress.org/Post_Types#Template_Files
if you are modifying location-single.php i.e. from our template folder, you copy that to yourtheme/plugins/events-manager/templates/
@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?
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?
@candnut
can you paste your code snippet? (using pastebin)
there’s a reason for this… location-single.php is now only used in MS Global tables mode.
Any other situation, you want to create a normal CPT theme template, e.g. createa single-location.php file and put it directly in your theme folder – http://codex.wordpress.org/Post_Types#Template_Files
@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 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 🙁
I’m having the same problem, tried customizing
wp-content/themes/*themeroot*/plugins/events-manager/templates/location-single.php
and nothing changes. I also tried adding
wp-content/themes/*themeroot*/single-location.php
and
wp-content/themes/*themeroot*/single-locations.php
and still, can’t seem to update event location page.
Does anyone know how to solve this?
try to see if you have locations set to show as a page, if so set it to post and see if single-location.php overrides
will fix this as it’s confusing