Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Alex

    (@ahoereth)

    Apparently the Framework creates its own screen capture of the video (https://dev.notashamedofthegospel.com/wp-content/uploads/2013/01/manageflitter.jpg).

    I guess (I have no access to the code) the framework does not make use of the default the_post_thumbnail function. To still use the plugin you would need to manually edit the code of the Single Post Page (single.php or single-post.php) source files and add an conditional using the has_post_video function.

    <?php if( has_post_video() ) { ?>
    <?php the_post_video(); ?>
    <?php } else { ?>
    <?php // default code to display the Featured Image goes here ?>
    <?php } ?>

    Sorry there is no more straight forward way. Many of the paid frameworks and paid themes do not make use of the WordPress functions which are intended for the same functionality – other people already reported similar problems.
    Still, I hope this might help, Alex

    Thread Starter peterguirguis

    (@peterguirguis)

    That does help, thank so much Alex for taking the time to post your reply ?? I’ll look into trying to get it fixed.

    Plugin Author Alex

    (@ahoereth)

    Would be nice if you could report back with your solution and maybe leave a rating! ?? From the outside point of view it should be very possible to fix it. Most not fixable problems with videos occur in featured post sliders or similar.

    As long as the php code above is in a loop then it should display something? Well, this is in my homepage.php:

    <?php
    	$audio_posts_query = new WP_Query( apply_filters( 'et_audio_posts_args', array(
    				'tax_query' => array(
    					array(
    						'taxonomy' => 'post_format',
    						'field' => 'slug',
    						'terms' => 'post-format-audio'
    					)
    				),
    				'showposts' => (int) et_get_option( 'harmony_audio_postsnum', 4 )
    			)
    		)
    	);
    ?>
    <?php if ( $audio_posts_query->have_posts() ) : ?>
    
    <!-- featured movie -->
    
    <?php if( has_post_video() ) { ?>
    <?php the_post_video(); ?>
    <?php } else { ?>
    <?php // default code to display the Featured Image goes here ?>
    <?php } ?>
    
    <!-- end of featured movie -->

    And in the front end nothing appears between my “featured movie” comments. Can give a heads up? Thanks for a much-needed plugin.

    Plugin Author Alex

    (@ahoereth)

    Does <?php the_title(); ?> echo something if you put it after your if clause? The WordPress codex about The Loop as example states the following:

    <?php if (have_posts()) : ?>
        <?php while (have_posts()) : the_post(); ?>
            <!-- do stuff ... -->
        <?php endwhile; ?>
    <?php endif; ?>

    the_post() calls $wp_query->the_post() which advances the loop counter and sets up the global $post variable as well as all of the global post data.

    The plugin requires the global post data to be set in order to determine which video is requested.
    Alternatively you can use has_post_video($post_id), where $post_id is the ID of the post from which you want to pull the featured video. This could be of interest for a front page, where only a single specific post or page is displayed all the time. You can determine the post ID on the post’s edit screen from the URL: [...]/wp-admin/post.php?post=42&action=edit, 42 being the post’s unique ID.

    Hope this solves your problem! Alex

    Hi Alex and Peter Guirguis,

    I have too use Headway’s framework and haven’t been able to get this plug-in to work properly. I installed it and tried to use it in a post, but all it does is cull a Featured Image from the Youtube video I’m trying to put as the featured video on both the index blog page and the single view post. It never actually displays the video at all.

    Headway’s framework does not have an single or single-post.php file to try out the work around code you suggested above BUT i did notice that Peter has the plug in working on his site.

    my test post:
    https://prettybeautifulthings.com/321/2013/04/my-first-video-tutorial/

    my index blog page:
    https://prettybeautifulthings.com/321/

    Please share how you got this to work if possible. Thanks!
    Dayo

    Thread Starter peterguirguis

    (@peterguirguis)

    Dayo,

    I ended up uninstalling the plugin because I found out that I there is a way to get what we want done using the Headway framework bh itself. It’s kind of difficult to explain in a forum how to do this. We can maybe do a Google+ talk or a Skype call?

    Peter

    Thank you for the quick response Peter. I’m available at your convenience. Skype: dnizal

    Plugin Author Alex

    (@ahoereth)

    From just the website it looks totally doable to integrate the plugin.
    Sorry that single.php does noit exist, I just guessed it using the general template hierarchy. I have no access to the source..

    If you want me to I can take a look at where to put the conditional if you send me your theme’s index.php? [email protected]
    Alex

    Here’s how I got FVP to work in Headway v3.5.x

    You will need to edit the file “content-display.php” in the Headway Theme directory. Find it here:

    /wp-content/themes/headway/library/blocks/content/content-display.php

    You’re going to be looking for the code block that begins with “function display_thumbnail” – In my case that was on line 735.

    Now a bit further down you will see the output code like this:

    echo '
    	<a href="' . get_permalink() . '" class="post-thumbnail post-thumbnail-' . $position . '">
    		<img src="' . esc_url($thumbnail_url) . '" alt="' . get_the_title() . '" width="' . $thumbnail_width . '" height="' . $thumbnail_height . '" />
    	</a>
    ';

    Just before that block, initiate this test loop:

    if( has_post_video() ) {
    		the_post_video();
    		} else {

    And, then, immediately after the “echo” block, close the loop:

    }

    That’s it! Works like a charm. Here’s the entire block as I edited it in the content display PHP:

    // RDB - Enables Featured Video Plus plugin in Headway
    // See https://www.ads-software.com/support/topic/compatbility-with-headway-framework
    		if( has_post_video() ) {
    		the_post_video();
    		} else {
    // The end of test loop initialization
    
    echo '
    	<a href="' . get_permalink() . '" class="post-thumbnail post-thumbnail-' . $position . '">
    		<img src="' . esc_url($thumbnail_url) . '" alt="' . get_the_title() . '" width="' . $thumbnail_width . '" height="' . $thumbnail_height . '" />
    	</a>
    ';
    
    // closing the Featured Video Plus loop
    }
    // 	That's it
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Compatbility with Headway Framework’ is closed to new replies.