WordPress.org

Forums

Jetpack by WordPress.com
[resolved] [closed] cant see sharing buttons on my events calendar/pages (30 posts)

  1. RolandOfEld
    Member
    Posted 1 year ago #

    hi everyone

    i utilise the events calandar plugin on my website, my issue is that i cannot see the jetpack sharing buttons on my events/event pages even though they are ticked in my sharing settings

    can anyone help please? site in question http://www.italianiaperth.com/events/

    http://wordpress.org/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I'm afraid I'm not too familiar with the Events Calendar plugin. Did you create a new template file to display events on your site?

    If so, you could add the following code where you want the buttons to appear:

    <?php echo sharing_display(); ?>

    Let me know if it helps.

  3. RolandOfEld
    Member
    Posted 1 year ago #

    i am using my normal front page template i user everywhere else on my site (where the sharing displays fine)

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I checked the Events Calendar plugin, and it seems to create its own custom template to display events.

    Luckily, it seems they also added a filter, tribe_events_after_html, allowing you to hook additional elements after the event content.
    I believe you could hook the sharing buttons into that filter, like so:

    function tweakecp_add_jpshare( $after ) {
    
    	if ( function_exists( 'sharing_display' ) ) {
    		$shares = sharing_display( '', true );
    	}
    
    	$after .= $shares;
    
    	echo $after;
    }
    add_filter( 'tribe_events_after_html', 'tweakecp_add_jpshare' );

    Now, I haven't tested this code but it should work.

    If it doesn't, you might want to get in touch with the Event Calendar plugin authors, and ask them how to work with that filter.

    You can post there to get some help with their plugin:
    http://wordpress.org/support/plugin/the-events-calendar

    Let me know if it helps.

  5. RolandOfEld
    Member
    Posted 1 year ago #

    that worked a treat for the individual events but not the overall calendar.. but its a great start! i will take up the overall calandar view with the guys at modern tribe..

    thanks for your prompt help!

  6. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Good, that's a start indeed. I had another look at the plugin files, but couldn't find the template used for the overall calendar. Would you mind pointing me to the thread you open with the Modern Tribe folks, so I can follow along and learn in the process?

    P.S.: nice username, by the way. I'm a fan of the Dark Tower series. :)

  7. RolandOfEld
    Member
    Posted 1 year ago #

    THANKEE SAI!!!

  8. RolandOfEld
    Member
    Posted 1 year ago #

    https://tri.be/support/forums/topic/jetpack-sharing-w-events-calendar/

    not sure if you can see it without being a paying customer though.. let me know. if not i am happy to post my findings here

  9. RolandOfEld
    Member
    Posted 1 year ago #

    reply from modern tribe:

    I’m not sure what’s going on there, but a couple of points come to mind.
    •Ideally you should return from your filter function, rather than echoing

    •I can only guess that sharing_display() is returning an empty string (or, for some reason, hasn’t been defined) on those views where it isn’t working, as the filter function itself certainly ought to be running … I’m afraid you would need to dig into Jetpack’s code or reach out to the authors again to work out which of those might be happening and why

  10. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I can only guess that sharing_display() is returning an empty string (or, for some reason, hasn’t been defined) on those views where it isn’t working, as the filter function itself certainly ought to be running

    I assume this means that the tribe_events_after_html filter is also used on the overall calendar view.

    Could you go to Settings > Sharing again, and make sure that the buttons are set to appear everywhere (on Posts, Pages, Events, Archive Pages, Home page)?

    If that doesn't help, could you try using the test function given by the Modern Tribe support folks here:
    http://pastebin.com/b2iEU4Jx

    When you add that function, do you see "Jetpack's sharing_display() function has not been defined" on the overall calendar page?

  11. RolandOfEld
    Member
    Posted 1 year ago #

    i see the following:

    sharing_display() is not returning anything

  12. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Alright. And are all the boxes checked under Settings > Sharing?

  13. RolandOfEld
    Member
    Posted 1 year ago #

    yep!

  14. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Thanks for bearing with me.

    Could you open the page where the overall calendar is displayed in your editor, and look for the sharing module below the editor? You'll want to make sure that Sharing is enabled there.
    http://en.support.files.wordpress.com/2010/08/post_sharing.png

    If you don't see the Sharing module, click on the "Screen Options" tab in the top right corner of the page, and enable Sharing.

    Let me know if it helps.

  15. RolandOfEld
    Member
    Posted 1 year ago #

    thats just the thing, the plugin does not 'sit' on any page so i cannot edit that page as you asked

    the events plugin only allows you to name the slug where the calendar can be seen.
    ie. domainname.com/events

  16. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I see. It might be a conflict with the 2 plugins. I will do some more tests, and I'll get back to you as soon as I have some news.

  17. RolandOfEld
    Member
    Posted 1 year ago #

    thankyou - i really appreciate your help with this

  18. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Could you try hooking into the tribe_events_after_the_content action instead? This action seems to be triggered inside a loop, right after the event excerpt, so it might be what you're looking for here.

  19. RolandOfEld
    Member
    Posted 1 year ago #

    afraid not :( changing tribe_events_after_html to tribe_events_after_the_content removed the sharing buttons completely.. from all views

  20. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Could you let me know the code you used? Since you don't hook into the same filter, you don't have to keep everything. This should be enough:

    function tweakecp_add_jpshare() {
    
    	if ( function_exists( 'sharing_display' ) ) {
    		$shares = sharing_display( '', true );
    
    		$assess = trim($shares);
    		if ( empty($assess) ) $shares = ' sharing_display() is not returning anything ';
    	}
    
    	return $shares;
    }
    add_action( 'tribe_events_after_the_content', 'tweakecp_add_jpshare' );

    You might also want to try with tribe_events_inside_after_loop, if the code above doesn't work.

  21. RolandOfEld
    Member
    Posted 1 year ago #

    still not working im afraid with both after_the_content or inside_after_loop - not in single event view or overall event view

    the only code that seems to partially work (to view a single event) is

    function tweakecp_add_jpshare( $after ) {
    
    	if ( function_exists( 'sharing_display' ) ) {
    		$shares = sharing_display( '', true );
    	}
    
    	$after .= $shares;
    
    	return $after;
    }
    add_filter( 'tribe_events_after_html', 'tweakecp_add_jpshare' );
  22. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Ok, let's try something else.

    Could you remove this custom code, and make the following change to the Jetpack plugin?
    https://cloudup.com/cXLL0d1u0XB

    If that works, we'll see about adding this to the next Jetpack release.

  23. RolandOfEld
    Member
    Posted 1 year ago #

    unfortunately not:(
    removed custome code and modified sharing-service.php - no sharing buttons on either event or events view :(

  24. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    hm. The code works on my end; it allows me to control whether I want the buttons to appear via the checkbox in Settings > Sharing.
    http://i.wpne.ws/Smw0

    Once I check that box, the sharing buttons appear below each excerpt on the events page. Here is how it looks with Twenty Eleven:
    http://i.wpne.ws/SnRt

    Once you've made the change, could you switch to one of the default themes for a few minutes to see if it helps?

  25. RolandOfEld
    Member
    Posted 1 year ago #

    ok! made some progress.. BUT:

    - i see the sharing buttons now on sitename.com/events but only if i have the custom code added to sharing-service.php AND the custom code to my functions.php (without the functions.php code i have the same problem as before. i went back to twentyten theme and the same result) could it be a plugin conflict?

    either way im very happy :D

  26. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Your Event Calendar settings are probably different from mine, and that might explain the differences.

    Are you all set then? I'll see about adding that piece of code to Jetpack Core in one of the next releases, after a few more tests. You can add yourself in cc of this ticket to follow our progress on this:
    http://plugins.trac.wordpress.org/ticket/2068

  27. RolandOfEld
    Member
    Posted 1 year ago #

    im set ! - thank you so much for your help

    long days and pleasant nights.

  28. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    :)
    May you have twice the number!

  29. kamillw88
    Member
    Posted 1 year ago #

    HI! I see some amazing things happening in this thread and I thought I'd throw my own struggles into the mix.
    I am unable to get the sharing short codes to display on the individual events pages from the WP Calendar plugin. With this plugin, I am not able to turn on the sharing capability from the settings panel. The "events" option just doesn't exist. I have tried downloading the short code plugin and making sure my jet pack sharing module is activated but the short codes won't work. I see there are some coding options I could try, but I don't know where to put them in my particular plugin.

    Please Help!!

    Thanks.

    dummy site I'm working on :
    http://www.susblog.org/events-2/calendar/

  30. esmi
    Forum Moderator
    Posted 1 year ago #

    @kamillw88: If you require assistance then, as per the Forum Welcome, please post your own topic.

    This 2 month old, resolved, topic references an old version of WordPress.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.