• Resolved bodabas

    (@bodabas)


    YT Lyte in Custom Field

    Hi, I would like to insert the httpv://youtube… inside the custom field and call/display it on the page using a Shortcoder plugin. I have read in FAQ to use lyte_preparse. I’m sorry to bother you, but I am not a coder. Where exactly should I input that preparse?

    Right now, the httpv://youtube… is embedded on my post, It is working fine but location is not flexible. What I want to do is move it somewhere in the page, outside of the post content, and I can only do it via the Shortcode.

    Thank you in advance.

    Russell

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    LYTE has support for shortcodes (e.g. [lyte id='_SQkWbRublY'] ) so maybe you don’t even need to “glue” it using lyte_preparse Russell?

    Thread Starter bodabas

    (@bodabas)

    Oh yes, I remember that. The only problem is that, it is for individual video ID. What I have been thinking is insert the httpv://youtube… inside the custom field. Then, call that custom field (full youtube URL regardless of video ID) on a part of the page, like before footer, after content, etc… using shortcoder plugin. Tried, this method but cannot get the video to show up. That is why I ended up inserting the httpv://youtube… in the post itself.

    When needed, I may want to remove all the videos from all of the pages by just deleting the shortcode from my template.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    so does the shortcoder plugin (which I don’t know) allow for code to be added/ specified somehow? or does it have an API which would allow you to write some PHP to target it and glue it together with LYTE’s API?

    Thread Starter bodabas

    (@bodabas)

    Hi. Sorry just got a little busy lately. It’s just now that I was able to sort things out.

    I was able to make it work by playing with the [lyte id=’idididid’].

    In the custom field “ytpost”, I just placed the (video ID) idididid only; no other strings aside from that. And then, I call the shortcode [lyte id=’$$custom_field:ytpost$$’] in my theme, and its done. It’s working just fine. Now, I can place the video wherever I want.

    Thanks and more power to you.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    nice! and is it the shortcoder plugin which interpretes and executes the $$custom_field:ytpost$$ part?

    Thread Starter bodabas

    (@bodabas)

    I believe so. I just placed the shortcode format you mentioned inside the ShortCoder parameter fields as follows:

    [lyte id='$$custom_field:ytpost$$']

    I can call that code on any part of the website, and it works without a problem.

    Thanks again.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I had a look at the Shortcoder documentation and indeed that gets the custom field (property) from the post. Looks like powerful plugin, good to know it exists, thanks for the feedback!

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