you can use shortcodes in text widget using wp plugin – “Shortcodes in Sidebar Widgets”
then use shortcode like [events_list blog=”1,2,3″]#_CUSTOMEVENTLINK
[/events_list] where 1,2,3 is the blog id
Hi Angelo,
Thanks for replying. I’ve tried the shortcut you posted changing the blog=”1,2,3″ to “blog=”12” as mine is but it reports ‘No Events’. There are upcoming events from next Saturday so they should be shown. Any ideas what’s stopping them from being displayed. Only the blog id is different from your exact shortcode.
should be blog=’1,2′ instead of blog=’12’ where 1 & 2 is the blog id
That wasn’t a typo……the blog id IS ’12’ for mine. Still won’t work.
is 12 is the blog id of your main site or it’s the id of your subsite?
My main site is 1, my subsite is 12.
hmm, so you’ve wanted to show main site events in your subsite ?
what’s the exact shortcode you’re using, and where (which blog) is it located ?
No Angelo, I wanted to show the blog 12 events in the main site. Thanks for responding Marcus, the exact code is as follows;
[events_list blog=”12″]#_CUSTOMEVENTLINK [/events_list]
That’s the code I am trying to add to my main site to bring up the site with the blog id of 12’s events.
If you use just
[events_list blog="12"]
does that work?
Where / how have you defined the #_CUSTOMEVENTLINK placeholder?
Thanks for your input Caimin. Unfortunately that doesn’t work either. I’ve tried to add the code supplied in both the ‘Events’ widget & also as a shortcode in a Text HTML widget. I’m trying to add the Events from site (blog) 12 on to the main site in the sidebar (actually the footer on my theme) not as a shortcode in a page or post.
Ah, ok that’s probably the problem – not all themes run shortcodes from within widgets.
Try adding this to the functions.php of your theme:
add_filter('widget_text', 'do_shortcode');
I would test with [events_list blog=”12″] to begin with to make sure it’s working.
Thanks Caiman. I tried that, still no joy. Is there any specific place in function.php it should be added? I simply inserted it before the closing ‘?>’
Pretty sure the position in the file wouldn’t make any difference. Does that shortcode work in a normal page?
Just tried it, nope it doesn’t.