• Resolved rafaelmagic

    (@rafaelmagic)


    Frank,
    I am not sure how to add your Custom Field code for Youtube Lyte.

    I currently have a Custom Field:
    udesign_post_video

    When I add the Iframe Youtube Embed it sends the YT video to a Blog Post.

    But I want it to Parse with Youtube Lyte.

    How do I add your Custom Field code to the code below.

    THANK YOU for your time..

    
    /* Add Video to Blog Featured Image*/
    
    function run_after_parent_theme_setup() {
    // Insert post video into Blog and Archive pages' posts
    function udesign_blog_section_post_video() {
    // Post Video
    echo get_post_meta( get_the_ID(), 'udesign_post_video', true );
    }
    add_action('udesign_blog_post_content_before', 'udesign_blog_section_post_video', 9);
    }
    add_action('after_setup_theme', 'run_after_parent_theme_setup');
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    When I add the Iframe Youtube Embed

    Lyte doesn’t act on iframe embeds, it expects a normal youtube URL? a httpv-link or a lyte shortcode

    echo get_post_meta( get_the_ID(), ‘udesign_post_video’, true );

    assuming this indeed echoes the youtube ID of the video, you would change that line into something like;

    if(function_exists(‘lyte_preparse’)) { echo lyte_preparse(get_post_meta( get_the_ID(), 'udesign_post_video', true )); }

    Thread Starter rafaelmagic

    (@rafaelmagic)

    Frank,

    I am not a programmer and I have a few questions.

    Do I have to combine the code above (original post) with the code you provided?

    Or are they separate?

    Might be easier if you can combine it for me. =)

    Thank you for your time,

    Rafael

    Thread Starter rafaelmagic

    (@rafaelmagic)

    Frank,

    I combined the code below.

    The code is not working. I cleared cache and restarted apache.

    /* Video Blog Featured Image */
    
    function run_after_parent_theme_setup() {
    // Insert post video into Blog and Archive pages' posts
    function udesign_blog_section_post_video() {
    // Post Video
    //echo get_post_meta( get_the_ID(), 'udesign_post_video', true );
    if(function_exists(‘lyte_preparse’)) { echo lyte_preparse(get_post_meta( get_the_ID(), 'udesign_post_video', true )); }
    }
    add_action('udesign_blog_post_content_before', 'udesign_blog_section_post_video', 9);
    }
    add_action('after_setup_theme', 'run_after_parent_theme_setup');
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    confirmed fixed by theme dev by Raphael, closing ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Field’ is closed to new replies.