This topic has 23 replies, 2 voices, and was last updated 9 years by Radu.

  • Author
  • #76332
     HDcms
    Participant

    HI,

    The theme generates an error when the video page (plugin: http://codecanyon.net/item/wordpress-video-robot-plugin/8619739) appears
    I contacted the author of the plugin who told me to contact you
    Regards

    COPY CODE
    <div class="post-content animated animate-when-almost-visible el-appear">
    		
    		<br>
    <b>Fatal error</b>:  Call to undefined function get_field() in <b>/srv/data/web/vhosts/www.xxxxxxxxxxxxx.eu/htdocs/wp-content/themes/kleo-yyyy/page-parts/post-content-masonry.php</b> on line <b>42</b><br>
    </div>
    #76471
     Radu
    Moderator

    Hi,

    I see that you use kleo-child, test it with kleo parent theme.

    Let me know

    Best Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #76648
     HDcms
    Participant

    HI,
    Yes you are right !!
    This code was working before a version change
    Will you tell me what is wrong
    Regards

    post-content-masonry.php

    COPY CODE
    			case 'video':
    
    				//oEmbed video
    				// **************** DEBUT MODIF HD *****************************  
    				// init $video = get_cfield( 'embed' ); 
    				$video = get_field('video_url');
    				// ****************** FIN MODIF HD *****************************  
    
    			case 'link':
    			// ******************* DEBUT MODIF HD *****************************  
                             $image = get_field('img-site'); 
    				
    			echo '<a href="'. get_permalink() .'" class="element-wrap">'
                            . '<img src="' . $image . '">' 
                            . kleo_get_img_overlay()
                            . '</a>';
    ....
    			// ******************* FIN MODIF HD *****************************  
    		
    			/*	echo '<div class="inner-content">'
    				. get_the_content()
    				. '</div><!--end inner-content-->';
    				break; */
    ....
    			case 'image':
    			default:
    				if ( kleo_get_post_thumbnail_url() != '' ) {
    					echo '<div class="post-image">';
    			// ******************* DEBUT MODIF HD *****************************  
    					$img_url = kleo_get_post_thumbnail_url();
    
    					$image = get_field('image');
    					/* $image = aq_resize( $img_url, $kleo_config['post_gallery_img_width'], null, true, true, true ); */
                            // ******************* FIN MODIF HD ***************************** 
    ....
    
    #77062
     Radu
    Moderator

    Hi,

    The get_cfield function it’s part of ACF Plugin kleo uses the get_cfield function so , try like this

    COPY CODE
    
    			case 'video':
    
    				//oEmbed video
    				// **************** DEBUT MODIF HD *****************************  
    				// init $video = get_cfield( 'embed' ); 
    				$video = get_cfield('video_url');
    				// ****************** FIN MODIF HD *****************************  
    
    			case 'link':
    			// ******************* DEBUT MODIF HD *****************************  
                             $image = get_cfield('img-site'); 
    				
    			echo '<a href="'. get_permalink() .'" class="element-wrap">'
                            . '<img src="' . $image . '">' 
                            . kleo_get_img_overlay()
                            . '</a>';
    ....
    			// ******************* FIN MODIF HD *****************************  
    		
    			/*	echo '<div class="inner-content">'
    				. get_the_content()
    				. '</div><!--end inner-content-->';
    				break; */
    ....
    			case 'image':
    			default:
    				if ( kleo_get_post_thumbnail_url() != '' ) {
    					echo '<div class="post-image">';
    			// ******************* DEBUT MODIF HD *****************************  
    					$img_url = kleo_get_post_thumbnail_url();
    
    					$image = get_cfield('image');
    					/* $image = aq_resize( $img_url, $kleo_config['post_gallery_img_width'], null, true, true, true ); */
                            // ******************* FIN MODIF HD ***************************** 
    ....
    
    

    REgards

    RAdu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #77189
     HDcms
    Participant
    This reply has been set as private.
    #77190
     HDcms
    Participant
    This reply has been set as private.
    #77557
     Radu
    Moderator

    Hi,

    The problem was caused by “….” at line 161…

    COPY CODE
    
    <?php
    /**
     * The template Masonry blog item
     *
     * @package WordPress
     * @subpackage Kleo
     * @since Kleo 1.0
     */
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(array("post-item")); ?>>
    <div class="post-content animated animate-when-almost-visible el-appear">
    
    <?php
    global $kleo_config;
    $kleo_post_format = get_post_format();
    
    /* For portfolio post type */
    if ( get_post_type() == 'portfolio' ) {
        if ( get_cfield( 'media_type' ) && get_cfield( 'media_type' ) != '' ) {
            $media_type = get_cfield( 'media_type' );
            switch ( $media_type ) {
                case 'slider':
                    $kleo_post_format = 'gallery';
                    break;
    
                case 'video':
                case 'hosted_video':
                    $kleo_post_format = 'video';
                    break;
            }
        }
    }
    
    switch ( $kleo_post_format ) {
    
        case 'video':
    
            //oEmbed video
            // **************** DEBUT MODIF HD *****************************
            // init $video = get_cfield( 'embed' );
            $video = get_cfield('video_url');
            // ****************** FIN MODIF HD *****************************
    
            // video bg self hosted
            $bg_video_args = array();
            $k_video = '';
    
            if (get_cfield( 'video_mp4' ) ) {
                $bg_video_args['mp4'] = get_cfield( 'video_mp4' );
            }
            if (get_cfield( 'video_ogv' ) ) {
                $bg_video_args['ogv'] = get_cfield( 'video_ogv' );
            }
            if (get_cfield( 'video_webm' ) ) {
                $bg_video_args['webm'] = get_cfield( 'video_webm' );
            }
    
            if ( !empty( $bg_video_args ) ) {
                $attr_strings = array(
                    'preload="none"'
                );
    
                if (get_cfield( 'video_poster' ) ) {
                    $attr_strings[] = 'poster="' . get_cfield( 'video_poster' ) . '"';
                }
    
                $k_video .= '<div class="kleo-video-wrap"><video ' . join( ' ', $attr_strings ) . ' controls="controls" class="kleo-video" style="width: 100%; height: 100%;">';
    
                $source = '<source type="%s" src="%s" />';
                foreach ( $bg_video_args as $video_type => $video_src ) {
                    $video_type = wp_check_filetype( $video_src, wp_get_mime_types() );
                    $k_video .= sprintf( $source, $video_type['type'], esc_url( $video_src ) );
                }
    
                $k_video .= '</video></div>';
    
                echo $k_video;
            }
            // oEmbed
            elseif ( !empty( $video ) ) {
                global $wp_embed;
                echo apply_filters( 'kleo_oembed_video', $video );
            }
    
            break;
    
        case 'audio':
    
            $audio = get_cfield('audio');
            if (!empty($audio)) { ?>
                <div class="post-audio">
                    <audio preload="none" class="kleo-audio" id="audio_<?php the_id();?>" style="width:100%;" src="<?php echo $audio; ?>"></audio>
                </div>
            <?php
            }
            break;
    
        case 'gallery':
    
            $slides = get_cfield('slider');
            echo '<div class="kleo-banner-slider">'
                .'<div class="kleo-banner-items" data-speed="2000">';
            if ( $slides ) {
                foreach( $slides as $slide ) {
                    if ( $slide ) {
                        $image = aq_resize( $slide, $kleo_config['post_gallery_img_width'], $kleo_config['post_gallery_img_height'], true, true, true );
                        //small hack for non-hosted images
                        if (! $image ) {
                            $image = $slide;
                        }
                        echo '<article>
    								<a href="'. $slide .'" data-rel="modalPhoto[inner-gallery]">
    									<img src="'.$image.'" alt="'. get_the_title() .'">'
                            . kleo_get_img_overlay()
                            . '</a>
    							</article>';
                    }
                }
            }
    
            echo '</div>'
                . '<a href="#" class="kleo-banner-prev"><i class="icon-angle-left"></i></a>'
                . '<a href="#" class="kleo-banner-next"><i class="icon-angle-right"></i></a>'
                . '<div class="kleo-banner-features-pager carousel-pager"></div>'
                .'</div>';
    
            break;
    
        case 'quote':
        case 'link':
            // ******************* DEBUT MODIF HD *****************************
            $image = get_cfield('img-site'); // J'ai enlevé une partie du code initial
            echo '<a href="'. get_permalink() .'" class="element-wrap" rel="nofollow">'
                . '<img src="' . $image . '"/>'
                . kleo_get_img_overlay()
                . '</a>';
        // ******************* FIN MODIF HD *****************************
    
        /*	echo '<div class="inner-content">'
            . get_the_content()
            . '</div><!--end inner-content-->';
            break; */
    
        case 'status':
    
            echo '<div class="inner-content">'
                . get_the_content()
                . '</div><!--end inner-content-->';
            break;
    
        case 'image':
        default:
            if ( kleo_get_post_thumbnail_url() != '' ) {
                echo '<div class="post-image">';
                // ******************* DEBUT MODIF HD *****************************
                $img_url = kleo_get_post_thumbnail_url();
                $image = get_cfield('image');
                /* $image = aq_resize( $img_url, $kleo_config['post_gallery_img_width'], null, true, true, true ); */
                // ******************* FIN MODIF HD *****************************
                if( ! $image ) {
                    $image = $img_url;
                }
                echo '<a href="'. get_permalink() .'" class="element-wrap">'
                    . '<img src="' . $image . '" alt="'. get_the_title() .'">'
                    . kleo_get_img_overlay()
                    . '</a>';
    
                echo '</div><!--end post-image-->';
            }
    
            break;
    }
    ?>
    
    <?php if ($kleo_post_format != 'quote' && $kleo_post_format != 'link' ) : ?>
    
        <div class="post-header">
    
            <?php if ($kleo_post_format != 'status'): ?>
                <h3 class="post-title entry-title"><a href="<?php the_permalink();?>"><?php the_title();?></a></h3>
            <?php endif; ?>
    
            <span class="post-meta">
                        <?php kleo_entry_meta();?>
                    </span>
    
        </div><!--end post-header-->
    
        <?php if ( $kleo_post_format != 'status' ): ?>
    
            <?php if (kleo_excerpt() != '<p></p>') : ?>
                <div class="post-info">
    
                    <div class="entry-summary">
                        <?php echo kleo_excerpt(); ?>
                    </div><!-- .entry-summary -->
    
                </div><!--end post-info-->
            <?php endif; ?>
    
        <?php endif; ?>
    
    <?php endif; ?>
    
    <div class="post-footer">
        <small>
            <?php do_action('kleo_post_footer');?>
    
            <a href="<?php the_permalink();?>"><span class="muted pull-right"><?php _e( "Read more","kleo_framework" );?></span></a>
        </small>
    </div><!--end post-footer-->
    
    </div><!--end post-content-->
    </article>
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #78709
     HDcms
    Participant

    Hi,
    Sorry but I do not understand what you’re saying!
    What should I do ?
    I upgraded to version 3.0.9. not resolved
    I repeat that it worked before without any code change on my part
    Regards

    #78724
     HDcms
    Participant

    Hi,
    2/ Before the user could only see the display of a video (for example: http://cb8bf3ad6e.url-de-test.ws/tom-rosenthal-its-ok-official-music-video-2/)
    Now there are more miniature
    How to remove the display of the thumbnail on the article?

    #78728
     Radu
    Moderator

    Hi,

    With the code that i provided you top ( it’s attached also on this reply ) put the file in kleo-child.

    regarding to this :
    ” 2/ Before the user could only see the display of a video (for example: http://cb8bf3ad6e.url-de-test.ws/tom-rosenthal-its-ok-official-music-video-2/) ”

    Make sure you have selected post template as video.

    Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #78896
     HDcms
    Participant

    Hi,
    ok for 2 /
    I had forgotten !
    Sorry
    Still not display the thumbnail of the video in blog mansonary
    I copied your code above, is that right? :

    COPY CODE
    <?php
    /**
     * The template Masonry blog item
     *
     * @package WordPress
     * @subpackage Kleo
     * @since Kleo 1.0
     */
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(array("post-item")); ?>>
    <div class="post-content animated animate-when-almost-visible el-appear">
    
    <?php
    global $kleo_config;
    $kleo_post_format = get_post_format();
    
    /* For portfolio post type */
    if ( get_post_type() == 'portfolio' ) {
        if ( get_cfield( 'media_type' ) && get_cfield( 'media_type' ) != '' ) {
            $media_type = get_cfield( 'media_type' );
            switch ( $media_type ) {
                case 'slider':
                    $kleo_post_format = 'gallery';
                    break;
    
                case 'video':
                case 'hosted_video':
                    $kleo_post_format = 'video';
                    break;
            }
        }
    }
    
    switch ( $kleo_post_format ) {
    
        case 'video':
    
            //oEmbed video
            // **************** DEBUT MODIF HD *****************************
            // init $video = get_cfield( 'embed' );
            $video = get_cfield('video_url');
            // ****************** FIN MODIF HD *****************************
    
            // video bg self hosted
            $bg_video_args = array();
            $k_video = '';
    
            if (get_cfield( 'video_mp4' ) ) {
                $bg_video_args['mp4'] = get_cfield( 'video_mp4' );
            }
            if (get_cfield( 'video_ogv' ) ) {
                $bg_video_args['ogv'] = get_cfield( 'video_ogv' );
            }
            if (get_cfield( 'video_webm' ) ) {
                $bg_video_args['webm'] = get_cfield( 'video_webm' );
            }
    
            if ( !empty( $bg_video_args ) ) {
                $attr_strings = array(
                    'preload="none"'
                );
    
                if (get_cfield( 'video_poster' ) ) {
                    $attr_strings[] = 'poster="' . get_cfield( 'video_poster' ) . '"';
                }
    
                $k_video .= '<div class="kleo-video-wrap"><video ' . join( ' ', $attr_strings ) . ' controls="controls" class="kleo-video" style="width: 100%; height: 100%;">';
    
                $source = '<source type="%s" src="%s" />';
                foreach ( $bg_video_args as $video_type => $video_src ) {
                    $video_type = wp_check_filetype( $video_src, wp_get_mime_types() );
                    $k_video .= sprintf( $source, $video_type['type'], esc_url( $video_src ) );
                }
    
                $k_video .= '</video></div>';
    
                echo $k_video;
            }
            // oEmbed
            elseif ( !empty( $video ) ) {
                global $wp_embed;
                echo apply_filters( 'kleo_oembed_video', $video );
            }
    
            break;
    
        case 'audio':
    
            $audio = get_cfield('audio');
            if (!empty($audio)) { ?>
                <div class="post-audio">
                    <audio preload="none" class="kleo-audio" id="audio_<?php the_id();?>" style="width:100%;" src="<?php echo $audio; ?>"></audio>
                </div>
            <?php
    <?php if ($kleo_post_format != 'quote' && $kleo_post_format != 'link' ) : ?>
    
        <div class="post-header"><!--end post-header-->
    
        <?php if ( $kleo_post_format != 'status' ): ?>
    
            <?php if (kleo_excerpt() != '<p>') : ?>
                <div class="post-info">
    
                    <div class="entry-summary">
                        <?php echo kleo_excerpt(); ?>
                    </div><!-- .entry-summary -->
    
                </div><!--end post-info-->
            <?php endif; ?>
    
        <?php endif; ?>
    
    <?php endif; ?>
    
    <div class="post-footer">
        <small>
            <?php do_action('kleo_post_footer');?>
    
            <a href="<?php the_permalink();? rel="nofollow">"><span class="muted pull-right"><?php _e( "Read more","kleo_framework" );?></span></a>
        </small>
    </div><!--end post-footer-->
    
    <!--end post-content-->
    </article>
    #78985
     Radu
    Moderator

    Hi,

    The video template in masonry view it shows the video not image. You want to have featured image instead a video in masonry view ?

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #79043
     HDcms
    Participant

    Hi,
    I would like to have a blog as I had before
    It was possible to play a video on the blog page as
    http://seventhqueen.com/themes/kleo/blog/
    The only thing is that the video from … a video field ACF !
    Thanks

    #79156
     Radu
    Moderator

    Hi,

    Can you provide ftp details and admin credentials ?

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #79251
     HDcms
    Participant
    This reply has been set as private.
    #79355
     Radu
    Moderator

    I also need FTP details.

    Regards

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #79358
     HDcms
    Participant
    This reply has been set as private.
    #79382
     Radu
    Moderator
    This reply has been set as private.
    #79420
     HDcms
    Participant

    Hi,
    It works
    Perhaps a network problem !!?
    @+

    #79506
     Radu
    Moderator

    Hi again,

    Unfortunately to make this plugin to work with our theme it will require some custom implementations. I recommend you to get help from a developer/hire a developer.

    I’ve given a look into the plugin that you use to import videos and will require some dedicated time to create this implementation.

    Can i can help you with anything else ?

    Best Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #79527
     HDcms
    Participant

    HI,

    I understand that you can not spend too much time on this problem.
    I have already contacted the developer of this plugin
    He said that this is due to change with the theme !!

    What is certain is that it worked before.
    Regards

    #80304
     Radu
    Moderator

    Hi,

    I had some free time and I’ve resolved the problem with the videos in masonry view.

    Please check it , it should be ok

    http://cb8bf3ad6e.url-de-test.ws/

    Best Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #81167
     HDcms
    Participant

    Hi,

    Sorry not seen the last response
    Sure it works on the test site
    I put the changes on the production site:
    style.css
    post-content-masonry

    something else ?

    The page does not display all types of video
    http://www.ecoethique.eu/categories/ressources/videos/
    and the 2nd page -> 404
    http://www.ecoethique.eu/categories/ressources/videos/page/2/

    an idea?

    Regards

    #81266
     Radu
    Moderator

    You need to copy from child these files to the kleo child theme live site.

    cb8bf3ad6e.url-de-test.ws/htdocs/wp-content/themes/kleo-child/page-parts/post-content-masonry.php
    cb8bf3ad6e.url-de-test.ws/htdocs/wp-content/themes/kleo-child/style.css

    Regarding the 404 error on page 2, try to re-save permalinks by going to wp-admin -> settings -> permalinks -> save changes and try after, if this is not working, if you have plugins that not comes with the theme disable them one by one to see if one of that plugin causes the error.

    Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 24 posts - 1 through 24 (of 24 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?