• Resolved questionator

    (@questionator)


    Hi,

    Could you provide a php shortcode? I’d like to put it in “Home” that’s why i ask.

    Thank you in advance

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Flector

    (@flector)

    just use code:

    
    <div class="ya-share2" data-services="facebook,twitter,pocket,viber,whatsapp,telegram" data-counter=""></div>
    
    Thread Starter questionator

    (@questionator)

    Hi @flector first of all thank you for the speedy reply i’ve thought it might take much longer for a reply.

    The DIV you’ve provided shares just the site as a whole, i’ve meant i have posts in “Home” too, just like a “latest posts feed” so i need a shortcode to have the regular yandex share output code for each post.

    My custom theme isn’t based on a standard theme so i need to add it manually.

    Thank you in advance

    Plugin Author Flector

    (@flector)

    php shortcode or wordpress shortcode?

    php:

    
    <div class="ya-share2" data-services="facebook,twitter,pocket,viber,whatsapp,telegram" data-counter="" 
    <?php echo 'data-url="'. esc_url( get_permalink( get_the_ID() ) ) .'" '; ?>
    <?php echo 'data-title="'. get_the_title( get_the_ID() ) .'" '; ?>
    ></div>
    

    documentation (in russian) – https://tech.yandex.ru/share/doc/dg/add-docpage/

    Thread Starter questionator

    (@questionator)

    Hey @flector that code worked, any idea how to have just a menu “…” button and then a inline popup with all the networks there instead of many share buttons? That would be awesome.

    Other than that ya ne govorju parusski, porusski? ??

    Plugin Author Flector

    (@flector)

    ??

    
    <div class="ya-share2" data-services="facebook,twitter,pocket,viber,whatsapp,telegram" data-counter="" 
    <?php echo 'data-url="'. esc_url( get_permalink( get_the_ID() ) ) .'" '; ?>
    <?php echo 'data-title="'. get_the_title( get_the_ID() ) .'" '; ?>
     data-limit="3"></div>
    
    Thread Starter questionator

    (@questionator)

    Spaciba, spacibo? @flector ??

    The “copy link” is in Cyrillian any chance to have that in english and is it also possible to have the data services only in the popup and just a menu “…” button without other share links outside of it? That would be fantastika!

    Plugin Author Flector

    (@flector)

    
    <div class="ya-share2" data-services="facebook,twitter,pocket,viber,whatsapp,telegram" data-counter="" 
    <?php echo 'data-url="'. esc_url( get_permalink( get_the_ID() ) ) .'" '; ?>
    <?php echo 'data-title="'. get_the_title( get_the_ID() ) .'" '; ?>
     data-limit="3" data-lang="en"></div>
    
    Plugin Author Flector

    (@flector)

    and is it also possible to have the data services only in the popup and just a menu “…” button

    
    <div class="ya-share2" data-services="facebook,twitter,pocket,viber,whatsapp,telegram" data-counter="" 
    <?php echo 'data-url="'. esc_url( get_permalink( get_the_ID() ) ) .'" '; ?>
    <?php echo 'data-title="'. get_the_title( get_the_ID() ) .'" '; ?>
     data-limit="0" data-lang="en"></div>
    
    Thread Starter questionator

    (@questionator)

    ty samy luchshiy (or something like that) !

    Thank’s a ton ??

    Plugin Author Flector

    (@flector)

    ty samy luchshiy

    thanks ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Php shortcode?’ is closed to new replies.