Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Hi V.;
    You’d have to call lyte_parse() on the custom field, possibly using an ACF filter like acf/format_value (but that is ACF territory, really).

    hope this helps,
    frank

    Thread Starter venenum11

    (@venenum11)

    I have seen acf/format_value. But obviously i don’t understand how to use it.
    Is there an example?

    Another way is to use native custom field of wordpress. In this way, how to use YouTube Lyte?

    Thank you!!!

    Plugin Author Frank Goossens

    (@futtta)

    If I’m not mistaking, there’s example code on the linked page, but I’m not a ACF user myself so can’t really comment on that.

    Just as for ACF, WordPress native custom fields can be LYTE’ed as well, but just as for ACF you’ll also need code to do so. Guess in that case in one of your theme files you’re pulling in the custom field, so that’s where you would do lyte_parse($custom_field_value);

    frank

    Thread Starter venenum11

    (@venenum11)

    Please, don’t go! I am trying ??

    Plugin Author Frank Goossens

    (@futtta)

    Please, don’t go!

    not going anywhere, it’s raining cats and dogs outside ??

    Thread Starter venenum11

    (@venenum11)

    well, thanks God it’s raining, i hope not too much.

    In custom field i write: <iframe width=”560″ height=”315″ src=”videoURL” frameborder=”0″ allowfullscreen></iframe>

    And in my content-video i write: <?php lyte_parse(the_meta());?>

    So:
    1. i see the video but LYTE in not applied.
    2. in this way argument of lyte_parse() is always the same

    Plugin Author Frank Goossens

    (@futtta)

    it’ll be easier to just put the youtube URL in the custom field really, else we’ll need some additional logic to understand the iframe-code, can you try with a YT url (for now, at least)?

    frank

    Thread Starter venenum11

    (@venenum11)

    Done, but return the url not the video.

    Plugin Author Frank Goossens

    (@futtta)

    did a quick test, use this instead;

    echo lyte_parse(get_post_meta($post->ID, "my_vid", $single));

    where my_vid should be the name of your custom field.

    frank

    Thread Starter venenum11

    (@venenum11)

    Warning: strpos() expects parameter 1 to be string, array given in C:\sviluppo\htdocs\www\…\wp-content\plugins\wp-youtube-lyte\wp-youtube-lyte.php on line 98

    Warning: preg_match_all() expects parameter 2 to be string, array given in C:\sviluppo\htdocs\www\…\wp-content\plugins\wp-youtube-lyte\wp-youtube-lyte.php on line 111

    Warning: Invalid argument supplied for foreach() in C:\sviluppo\htdocs\www\…\wp-content\plugins\wp-youtube-lyte\wp-youtube-lyte.php on line 113

    Thread Starter venenum11

    (@venenum11)

    I am testing:

    <?php echo lyte_parse(get_post_meta($post->ID, ‘link-video’ , true)); ?>

    Seems it works. I am tryng again.

    Frank, thank you!!

    Plugin Author Frank Goossens

    (@futtta)

    you’re welcome!

    have fun,
    frank

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