Jetpack by WordPress.com
[resolved] echo sharing_display does not work in post archive? (5 posts)

  1. Stephen S
    Posted 2 years ago #

    Hi, following advice in other threads, I tried to add:

    <?php if ( function_exists( 'sharing_display' ) ) {
        echo sharing_display();
    } ?>

    In a custom post archive, but it will not show up. It shows up fine in content-single.php. Any ideas?


  2. Stephen S
    Posted 2 years ago #

    The above code will only work if the option including archives is set in the settings page of the plugin. Then i added separate code to hide the default so it only shows the in the location I want.

  3. aces
    Posted 2 years ago #

    It doesn't work for my custom post type archive.

    Although it shows those buttons on the page, when clicked they load the same page into a window, rather than the twitter / facebook posting form one would expect.

    See bug report: https://github.com/Automattic/jetpack/issues/211

  4. Stephen S
    Posted 2 years ago #

    The difference, I believe, is that you are trying to link to the archive page in its entirety (correct?) whereas I am trying (and now succeeding, after checking that pref) to share individual posts on my archive page.

  5. aces
    Posted 2 years ago #

    ah, fair enough, I am trying to share the whole archive list....

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic