Black Friday sale! Get 25% off WPSP Pro! Discount automatically applied at checkout.

[Support request] Can this be done with WPShowPosts?

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Can this be done with WPShowPosts?

  • This topic has 3 replies, 2 voices, and was last updated 5 months ago by Tom.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16633
    Dan
    Participant

    If you look at this image on a non-gp site. Origin Site URL you can see that below the “Read More” there is an area where they are inserting a rewardStyle widget on each affiliate post.
    On the site I am building out I would like to replicate this. I know the social buttons appear in this area so I was wondering how I could embed a shortcode in this area for each post. This image shows the latest layout of each post on the front page. Site being built
    My thoughts would be to use ACF to create a field on the sidebar that could have the shortcode for that post entered into it. (Test Shortcode: [show_shopthepost_widget id=”4065900″]) This would allow the end-user to just enter the code. Then when WPShowPosts is pulling the post data if that field has data, fir that shortcode off under the social buttons.

    I would love to know your thoughts on how to accomplish this.
    Thanks

    #16640
    Tom
    Keymaster

    Hi there,

    You can use a hook for this.

    For example:

    add_action( 'wpsp_after_content', function( $settings ) {
        if ( 123 === $settings['list_id'] ) {
            echo do_shortcode( '[your-shortcode]' );
        }
    } );

    Hope this helps 🙂

    #16796
    Dan
    Participant

    Thank You Tom, I will try this and see if I can figure something out.

    #16810
    Tom
    Keymaster

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.