Tagged: oembed embed
- This topic has 3 replies, 2 voices, and was last updated 6 years, 6 months ago by
fredrikcarlen.
-
AuthorPosts
-
-
August 13, 2015 at 8:10 am #4193
fredrikcarlenMemberI want to enable oEmbed for Wistia for my CPT developed using standard Piklist stuff. I have enabled embeds for Wistia using a plugin, which works…for standard posts/pages. In my CPT, I don’t use the standard
genesisloop (so yes, using Genesis). It looks like this:function user_guide_setup() { //* Remove the default Genesis loop remove_action( 'genesis_loop', 'genesis_do_loop' ); //* Add user guides add_action( 'genesis_loop', 'display_user_guide_items' ); } function display_user_guide_items() { $postId = get_the_ID(); $guide_items = get_post_meta($postId, 'user_guide_item', false); piklist(get_stylesheet_directory() . '/piklist/addmore-templates/user_guide_item', array('data' => $guide_items, 'loop' => 'data')); } genesis();This works, except for the embed. I followed the guide on this page http://www.kevinleary.net/oembed-excerpts-custom-fields/, but this does not work.
I have no idea how to get the result that
piklistspits out to be able to filter it, so what do I do? -
August 13, 2015 at 8:35 am #4194
fredrikcarlenMemberFigured out a hack, but would really like to know what the better approach is. My hack, in the add-more template:
<?php $data = apply_filters('the_content', $data); ?> <div class="p2-guide-section"> <div class="flexible-widgets guide-area"> <div class="wrap"> <section class=""> <p><?php echo $data; ?></p> </section> </div> </div> </div> -
August 13, 2015 at 10:44 am #4196
SteveKeymaster@fredrikcarlen– Welcome to the Piklist community!
Why do you think this is a hack? Looks fine to me.
-
August 13, 2015 at 11:02 am #4200
fredrikcarlenMemberOK, then, if you say so 🙂
-
-
AuthorPosts
- The topic ‘How to enable oEmbed for CPTs developed using Piklist?’ is closed to new replies.