Support » Plugin: WP YouTube Lyte » Text Widget with php used with Page Builder

  • Resolved Lineone

    (@lineone)


    Hi futta,

    I’m using a text widget (with php enabled) to querie for a post with a Standard Loop. The returned post includes a youtube audio video. This widget is then used on a page made with the Elegant Themes’ Page Builder and their Divi theme. Advanced Ajax Page Loader 2.6.8 is also activated on the site. The content of the post is displayed but the ‘httpa’ does not create a player. Is there something I can do to fix this?

    Thanks,

    LineOne

    https://wordpress.org/plugins/wp-youtube-lyte/

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

    (@futtta)

    Not sure I understand 100%, but guess you should

    lyte_parse($post_content);

    hope this helps,
    frank

    Yes. That seems to have done the trick.

    The (simplified) code in question is now:

    <?php
    $args = array(
    	'cat' => 13,
    	'posts_per_page' => 1,
    	'order' => 'DESC'
    );
    
    // The Query
    $the_query = new WP_Query( $args );
    remove_filter('posts_where', 'filter_where');
    
    // The Loop
    if ( $the_query->have_posts() ) { ?>
    	<ul>
    	<?php
    	while ( $the_query->have_posts() ) {
    	$the_query->the_post(); ?>
    	<li>
    		<a href="<?php echo get_the_permalink() ?>"><h3><?php echo get_the_title() ?></h3></a>
    		<?php echo lyte_parse(do_shortcode(get_the_content())) ?>
    	</li>
        <?php
    } ?>
    </ul>
    <?php
    } else {
    	// no posts found
    } 
    
    /* Restore original Post Data */
    wp_reset_postdata();
    ?>

    Many thanks Frank

    Plugin Author Frank Goossens

    (@futtta)

    Great!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Text Widget with php used with Page Builder’ is closed to new replies.