[Support request] WPSP with videos

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support WPSP with videos

Tagged: 

This topic contains 7 replies, has 2 voices, and was last updated by  Tom 6 days, 17 hours ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #10618

    Cris
    Participant

    Hi,

    I would like to do WPSP with videos. Is it possible?

    #10624

    Tom
    Keymaster

    Hi there,

    Are you wanting to replace your featured images with videos?

    Let me know 🙂

    #10625

    Cris
    Participant

    Hi there,

    Yes! Something like this

    #10637

    Tom
    Keymaster

    How would you define the video? Using a custom field.

    I can’t find any plugins for it, so it’s likely necessary to un-hook the current image and hook in the video (depending on where it’s coming from).

    #10648

    Cris
    Participant

    I created the Custom Post Type “video” and it contains the Custom Field “videoyou”
    Could you help me to unhook the image and hook the video, please?

    If possible, the idea I have is that in the WPSP list, when clicking on the video it will be reproduced and, when clicking on the title, it goes to the corresponding page link.

    • This reply was modified 1 week, 2 days ago by  Cris. Reason: clarify content
    #10661

    Tom
    Keymaster

    So first you’ll want to disable the images in your list settings.

    Then add this PHP:

    add_action( 'wpsp_before_header', function() {
        $video = get_post_meta( get_the_ID(), 'your_field_name', true );
    
        if ( $video ) {
            echo $video;
        }
    } );

    This assumes that the custom field has the full video HTML.

    #10666

    Cris
    Participant

    Thank you very much Tom!
    Your code works but, instead of the video, there is only the link of the video with the title. You know why?

    #10691

    Tom
    Keymaster

    Hi there,

    Does your custom field include the full HTML for the video?

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

You must be logged in to reply to this topic.