[resolved] Insert code into single pages (3 posts)

  1. Soccerwidow
    Posted 3 years ago #

    Great plugin!

    Which PHP code do I need for adding the Facebook, Twitter, Google+ buttons automatically on the bottom of each post?

    I just don't want two separate plugins for social sharing. I thought to add sth in single.php use and then display the social buttons on all articles. Content protection when needed manually.


  2. Markus Drubba
    Plugin Author

    Posted 3 years ago #

    Yes you can. Use the do_shortcode() method of the WordPress core. For example:

    do_shortcode('[l2g name="Download this awesome file" id="999" facebook="true" twitter="true" gplusone="false"]')

  3. Soccerwidow
    Posted 3 years ago #

    Thank you!

    This is the code I have now inserted. Works great :)

    if (function_exists('wplike2get_shortcode')) {
    echo do_shortcode('[l2g]<br >');
    } else {
    	echo "";

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • wpLike2Get
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic