Support » Plugin: Events Manager » Social sharing idividul events issue

  • I’ve hunted around but can’t find a solution to this:

    I’d like site visitors to be able to share each ‘Single Event Page’ on their favourite social network.

    However currently when the social buttons that I’ve placed on each ‘single event page’ are clicked only the URL of the main ‘Event List Page’ is shared.

    The permalink changes in my address bar on every ‘single event page’ so I don’t see why this isn’t passed on.

    I’ve tried several WP sharing plugins and also directly pasted sharing code from ADDTHIS on to the event pages with no success (though all my other non-event pages/post will ‘share’ fine). I hope I’ve explained this clearly and someone can help.

Viewing 15 replies - 1 through 15 (of 41 total)
  • hey i got the same issue…. can you tell me what you’ve done till now?

    i did not even find the file to place the php wp sharing snippet….

    No joy yet. I installed a few plugins that put social links at the top of every page but trying different plugins hasn’t made a difference. It might be to do with the fact that all events pages are rendered from the same page. The address bar shows a unique URL for each event though – all I want is that link to be sent to facebook/twitter etc when someone clicks one of the social bookmarking buttons.

    Hey ok i think it dont will work with these plugins, that put the button automatically in the post. you will need either the “<iframe>” facebook tag or the fb plugin, where you can set the button where you wish by putting <?php echo wpfblike(); ?> in any php file.

    ok so i think you will need a php code like above to put the button where you wish.
    theres just a big problem within em. because the single event pages are produced as html pages. if you put this php code into the formatting single event pages after #_notes in the dashboard you dont get any output.

    so you have to put it into source code and generate just something like #_notes (maybe #_social_share_buttons) and define it in the same php file as #notes as “<?php echo wpfblike(); ?> function”. but i dont know where #_notes and how #_notes is genereated (i mean theres an input, sure, but what file says that the input is = #_notes)

    ps.: i just took fb as example (same way should work with twitter, etc. once you defined a variable, should be easy to call and echo the function)

    Thanks for that. Though it means getting into the PHP much deeper than I’d hoped. Surely there’s a way to do it without creating custom placeholders.

    Ok, progress….

    I used the facebook like button generator ()
    and put the placeholder #_EVENTURL in the ‘URL to Like’ field.

    <div id="fb-root"></div><script src=""></script><fb:like href="#_EVENTURL" send="true" width="450" show_faces="true" font=""></fb:like>

    I then pasted the code in the ‘Single Event Format’ field in EM settings. It seems to work, though my site’s not online yet so I can;t fully test comments etc which require facebook connecting with the relevant site pages.

    This isn’t the end of it beause I want social sharing buttons for several providers not just facebook but I think using the #_EVENTURL placeholder will be the way forward.

    oops! i put the link to the like button generator in brackets and it’s mess up the above post 🙂

    Anyway, responses or better solutions the OP welcome.

    …and the same works for twitter:

    <a href="" class="twitter-share-button" data-url="#_EVENTURL" data-text="#_NAME" data-count="none" data-via="BTBStorytelling">Tweet</a><script type="text/javascript" src=""></script>

    Though for some reason the script call has to be after the link or the button displays 3 times.

    I pasted the above code into the single event format box after my #_NOTES section.

    Plugin Author Marcus


    to make social buttons work, you want to add them after the content from em_content filter.

    the event object is passed on there, so you can genearate the social media buttons pasing on the right url

    Thanks Marcus
    ok.. so that’s why this above method has been working for me. I don’t know how to implement your suggestion as I’m quite a novice with php an EM but I’ll have a look.

    In layman’s terms (if it’s easy to do so) where is the best place to paste in the code for some addthis butons?

    Ok, my final post on this topic. It seems the easiest way is to use something like the following addthis code into your ‘Single Event Format’ box in EM settings.

    It’s the version of the addthis code where you can specify the share URL and Title.

    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style "
    <a href="*****_THIS IS WHERE THE LINK TO YOUR ADDTHIS PROFILE GOES_*****" class="addthis_button_compact">Share</a>
    <span class="addthis_separator">|</span>
    <a class="addthis_button_preferred_1"></a>
    <a class="addthis_button_preferred_2"></a>
    <a class="addthis_button_preferred_3"></a>
    <a class="addthis_button_tweet" tw:via="YOUR_TWITTER_USER_NAME"></a>
    <a class="addthis_button_facebook_like"></a>
    <script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
    <script type="text/javascript" src=""></script>
    <!-- AddThis Button END -->

    I got the ‘addthis’ code here.

    hey unfortunately your solution doesn’t work because i do not got an fb app ID. so registrated to get this app id but i always got an ERROR behind my like button ( you must registrate an admin or app id and write this app id in meta tags blabla…. ; i did this but always same error)

    so what i need is what marcus told: dd them after the content from em_content filter.

    so and this is where i stuck:

    how do i Override Event Page Content With Filters?
    where i have to put the following code?

    function my_em_custom_content($content){
    	if( /* Do something here to decide whether to override */ ){
    		$content .= "Here, I'm adding this extra text to the end of my event content.";
    	//Whatever happens, you must return the $content variable, altered or not.
    	return $content;

    just in an extra functions.php file in my theme? or in a file from events-manager? and what means “Do something here to decide whether to override”. i dont want to override something, just to add the php snippet for social share buttons.

    maybe someone more gifted can make an add-on for social share buttons and explain me how it works 🙁

    I’m sorry to hear you’re having issues. I didn’t have to apply for a facebook app ID or change any PHP.

    I opened a free account with ADDTHIS and used they’re help pages to make the sharing toolbox i wanted (including the tweet and fb like buttons). I included the code to specify the URL rather than just the page the toolbox is placed on. I put #_EVENTURL where the URL should be.

    Here is the contents of the EVENT LIST FORMAT field in EM settings:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Hope that’s not too much code but I want to help.

    It works in IE, Chrome, Firefox and definately posts the links on my facebook page (no errors).

    Good luck

    so the answer was yes….too much code! lol

    Pastebin link here for the examplecode

    Plugin Author Marcus


    i hadn’t thought about this but I guess I might find a way to make social buttons work on EM (although this would be a pro feature). Probably would make it integrate with another plugin e.g. sociable.

    any other plugin suggestions? I’d go for a mix of the most popular/stable/flexible one.

Viewing 15 replies - 1 through 15 (of 41 total)
  • The topic ‘Social sharing idividul events issue’ is closed to new replies.