Genesis Featured Widget Amplified
[resolved] Add a Pinterest button? (2 posts)

  1. cyndimarie
    Posted 3 years ago #

    Hi Nick,

    I use this plugin all the time and I love it.

    I have a client who likes the look of the featured posts in her sidebar, but she also wants a Pinterest button underneath the featured image.

    I'm going to look at creating a function that outputs the pin button and then hook it with one of the hooks you listed.

    I just wanted to check here first to see if you already knew of a way to accomplish this?



  2. cyndimarie
    Posted 3 years ago #

    I figured it out quicker than I thought. Here's the finished product:

    add_action( 'gfwa_before_post_content', 'gfwa_pin' );
    function gfwa_pin() {
        /** Horizontal */
        printf( '<div class="pinterest-button"><a href="http://pinterest.com/pin/create/button/?url=%s&media=%s" class="pin-it-button" count-layout="horizontal">Pin It</a><script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script></div>', urlencode( get_permalink() ), urlencode( genesis_get_image( array( 'format' => 'url' ) ) ) );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Genesis Featured Widget Amplified
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.