Title: Php shortcode?
Last modified: March 3, 2019

---

# Php shortcode?

 *  Resolved [questionator](https://wordpress.org/support/users/questionator/)
 * (@questionator)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-shortcode-23%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Flector](https://wordpress.org/support/users/flector/)
 * (@flector)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269576)
 * just use code:
 *     ```
       <div class="ya-share2" data-services="facebook,twitter,pocket,viber,whatsapp,telegram" data-counter=""></div>
       ```
   
 *  Thread Starter [questionator](https://wordpress.org/support/users/questionator/)
 * (@questionator)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269644)
 * Hi [@flector](https://wordpress.org/support/users/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](https://wordpress.org/support/users/flector/)
 * (@flector)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269729)
 * 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/](https://tech.yandex.ru/share/doc/dg/add-docpage/)
 *  Thread Starter [questionator](https://wordpress.org/support/users/questionator/)
 * (@questionator)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269761)
 * Hey [@flector](https://wordpress.org/support/users/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](https://wordpress.org/support/users/flector/)
 * (@flector)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269764)
 * 😉
 *     ```
       <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](https://wordpress.org/support/users/questionator/)
 * (@questionator)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269803)
 * Spaciba, spacibo? [@flector](https://wordpress.org/support/users/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](https://wordpress.org/support/users/flector/)
 * (@flector)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269808)
 *     ```
       <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](https://wordpress.org/support/users/flector/)
 * (@flector)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269815)
 * > 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](https://wordpress.org/support/users/questionator/)
 * (@questionator)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269825)
 * **ty samy luchshiy** (or something like that) !
 * Thank’s a ton 🙂
 *  Plugin Author [Flector](https://wordpress.org/support/users/flector/)
 * (@flector)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269826)
 * > ty samy luchshiy
 * thanks 🙂

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Php shortcode?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/easy-yandex-share_fdead5.svg)
 * [Easy Yandex Share](https://wordpress.org/plugins/easy-yandex-share/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-yandex-share/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-yandex-share/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-yandex-share/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-yandex-share/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-yandex-share/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 10 replies
 * 2 participants
 * Last reply from: [Flector](https://wordpress.org/support/users/flector/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/php-shortcode-23/#post-11269826)
 * Status: resolved