[Resolved] WPSP Pro: Custom option in Social

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support WPSP Pro: Custom option in Social

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  Tom 2 weeks, 1 day ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11623

    Cesare
    Participant

    Hello,

    I’m using the Facebook Like button instead of the share button that you find in the Social section of WPSP Pro.

    I’d like to be able to decide whether I want to show the like button in a list or not: would it be possible for you to insert a checkbox or something that I’ll be able to read on the wpsp_after_content hook?

    Thank you.

    #11644

    Tom
    Keymaster

    Hi there,

    How are you inserting the Facebook Like button at the moment?

    #11647

    Cesare
    Participant

    Hi Tom!

    So, in my functions.php:

    1. I’m integrating the Facebook SDK via the wp_body_open hook.

    2. I’m inserting the Facebook Like button HTML via the wpsp_after_content hook

    I’d like to be able to decide if a list should have this button or not, so I need a variable to check.

    Thank you!

    #11660

    Tom
    Keymaster

    Got it, try this:

    add_action( 'wpsp_after_content', function( $settings ) {
        if ( 123 === $settings['list_id'] ) {
            // We're inside list 123
        }
    } );

    Let me know 🙂

    #11672

    Cesare
    Participant

    That worked perfectly, you’re the man! 😉

    Thank you Tom!

    #11700

    Tom
    Keymaster

    You’re welcome 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.