scharc
Forum Replies Created
-
i think my description is selfexplaining and really easy… but you asked for it, so here it goes again:
1. follow this: http://wp-events-plugin.com/documentation/using-template-files/
2. add some custom attributes, in my example its “Facebook-Link”. remember, case-sensitive!
3. you want something done to your single-event view, so copy your modifications from the admin panel to the event-single.php
mine looks like: http://pastebin.com/c4zaNyJL
thats it!
i run into the same problem with my facebook link and i had a totally different approch… here is my solution:
i copied the template folder into my theme folder and started adding stuff to it like you do normal in the admin panel (well documented…)
then i had a look at the class-functions and class-attributes you could get if you global $EM_event
marcus pointed out, that there is a stored information in the $EM_event object called ‘attributes’ which will return all the attributes eg. custom fields and custom meta (or at least all meta?! not sure anymore)
so i just went and wrote like
$attr = $EM_Event->attributes;
if(isset($attr[‘your custom attr’]) && strlen($attr[‘your_custom_attr’]) > 0) do something tricky;i use this for facebook links.. if there is one, i will print it out if not .. not
if needed i could copy-past my code somewhere
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?
just for the shortcodes dont work in the widget part:
add_filter(‘widget_text’, ‘do_shortcode’); <- into the functions.php of your theme and shortcodes are working in the widgets
its me again…
i tried to get the text-widget to work and run into some more problems:
i added to my themefunction
add_filter('widget_text', 'do_shortcode');
for the shortcode-support and made a custom shortcode function
[foobar]when i use the [events_list] shortcode its doing well.
when i do[foobar] [events_list limit="3" ]do something [/events_list]its doing its job as well … and my custom shortcode gets replaced as well
BUT
when i do[events_list limit="3" ]do something [foobar] [/events_list]the [foobar} shortcode is not replaced!
any suggestions?
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…
thanks
instead of using #_EVENTLINK in the widget, use your own a element:
have a look at: http://wp-events-plugin.com/documentation/placeholders/ for more placeholders
that is ugly! 😉
you have to dive into your /wp-content/themes/twentyten/header.php
its somewhere around line 69 – 78
thanks for the short notice…
still love your great work
i meant more a Event Conditional Placeholder for the event-page like
{has_attr('xx')}content{/has_attr}my workaround is another plugin at the moment: http://wordpress.org/extend/plugins/conditional-custom-fields-shortcode/
Forum: Plugins
In reply to: [article2pdf] [Plugin: article2pdf] How to create PDF template?Same question here!