• 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 - 16 through 30 (of 41 total)
  • @wambrose:Ok well… if nothing else works, ill do it your way…. (although i dont want to create another “useless” account somewhere)
    i just had another issue besides the erros… the placeholder #_EVENTURL returns the url of the events list page and not the single event page. did you got the same error?

    so far i figured out how to add filter like marcus said.
    i have just one small problem:

    @marcus:the social button appears under the events list page and under the single events page…. but i just want it to be shown on single events page.
    what do i have to write in the if statement to exclude the events page list?(think would be the easiest way)

    function my_em_custom_content($content){
    	<strong>if( site != event list page ){</strong>
    		$content .= "Here, I'm adding this extra text to the end of my event content.";[...]

    Marcus, If you could add a “Facebook like” feature to the pro version, we would definitely buy it. For us, its all that’s missing from your otherwise great plugin.

    Would love to hear if there is a quickfix in the meantime. All options above are beyond my capabilities!

    Thanks.

    I couldn’t get #_EVENTURL to work, so here is another way to do it.

    Sign up for addthis.com (it takes 3 minutes). Pick what style you want. Copy and pasting this code will not work, because you need to get your own addthis code.

    This is the code to get the url that is displaying. Make sure this is used in a php file (not in the event manager single event box. I put it in my header.php

    <?php
    function curPageURL() {
     $pageURL = 'http';
     if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
     $pageURL .= "://";
     if ($_SERVER["SERVER_PORT"] != "80") {
      $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
     } else {
      $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
     }
     return $pageURL;
    }
    ?>

    Use this code where you need to show the page url

    <?php echo curPageURL();?>

    In the addthis site it will give extra options where you can add a specific url and will look something like this: (you’ll notice I this <?php echo curPageURL();?> in place of the url)

    <div class="addthis_toolbox addthis_default_style " addthis:url="<?php echo curPageURL();?>">
    <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_preferred_4"></a>
    <a class="addthis_button_compact"></a>
    <a class="addthis_counter addthis_bubble_style"></a>
    </div>
    <script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
    <script type="text/javascript" src="your personalized addthis account will be here"></script>

    The finished product will look something like this:

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

    Remember to put this code in a php file, it won’t read the php script in the event manager settings. Good luck.

    Thread Starter wambrose

    (@wambrose)

    @bspr3663 would love to see what you came up with (your code was “moderated as per the Forum Rules”.)

    My #_eventurl theory only worked for the tweet and facebook like button but not the facebook share and several others. Facebook won’t accept any data given to it at the button it still scans the page for it’s open graph meta data (which i have working and dynamically set for all pages). However, the meta data doesn’t change between the events pages. I just end up sharing the main events page.

    So back to square 1?!

    Thread Starter wambrose

    (@wambrose)

    I need to know how i can make the URL provided by get_permalink()
    (as used in my header to provide facebook with a URL) to actually point to the single event page rather than always giving the root events page.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    you should use $EM_Event->output(‘#_EVENTURL’);

    $EM_Event should be globalized beorehand.

    i wont revisit this post because it’s insanely long to read now, but know that we’re working on this atm and plan to have a social media add-on, but this will be limited for pro users, hopefully within the week.

    Thread Starter wambrose

    (@wambrose)

    I thought I should revisit this topic to share my solution:

    I didn’t use Event Manager! Drastic I know but I didn’t need to booking facility so I just create a custom post time with Custom Post Type UI plugin, created a meta box for entering event info with Verve Meta Boxes plugin and then followed a few tutorials to create the page templates to display the info.

    EM is fantastic out of the box but it may need to embrace custom post types at some point. Hope that helps someone ??

    Thread Starter wambrose

    (@wambrose)

    ***I should have read my post before submitting! Corrections:***

    I thought I should revisit this topic to share my solution:

    I didn’t use Event Manager! Drastic I know but I didn’t need THE booking facility so I just create a custom post TYPE with Custom Post Type UI plugin, created a box for entering event info with Verve Meta Boxes plugin and then followed a few tutorials to create the page templates to display the info.

    EM is fantastic out of the box but I can see how having events as posts is of major benefit. Hope that helps someone ??

    nixnix

    (@nixnix)

    Marcus, I have the same error and I’m desperated!! In what file should I put the $EM_Event->output(‘#_EVENTURL’); ?

    Cheers

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    depends what you’re trying to do, you can actually add buttons like the fb like button in your event formatand just use #_EVENTURL see last post by me, repost in a new topic if u have more issues.

    btw, next week, the beta should be out, plugins likesociable should work then with em.

    nixnix

    (@nixnix)

    Marcus, I tried that but doesn’t work ??
    When sharing it displays the whole event section, not the single event.
    You can check it out here: https://www.nix-nix.com/nuevo/events/?event_id=74

    The code I used for the sharing button is this:

    <a name="fb_share" type="icon_link"
       share_url="#_EVENTURL">Compartir en Facebook</a>
    <script src="https://static.ak.fbcdn.net/connect.php/js/FB.Share"
            type="text/javascript">
    </script>

    Am I doing something wrong?

    Thanks!

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    try this

    <div id="fb-root"></div><script src="https://connect.facebook.net/en_US/all.js#appId=194211367311517&xfbml=1"></script><fb:like href="#_EVENTURL" send="true" width="450" show_faces="true" font=""></fb:like>

    that definitely works. if not, note that you may want to remove the script bit if you use fb scripts elsewhere in your page, since it’d already have loaded it once.

    John

    (@vyashemendra03)

    @marcus lot of thanks to you for EM……..

    nixnix

    (@nixnix)

    Thanks Marcus! But that’s the like button, I need the sharing button ??

    nixnix

    (@nixnix)

    And it’s still not working ??

    2 updates of the EM ago, it worked fine…

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