Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter umbrellacoders

    (@umbrellacoders)

    https://cities-trip.ru/
    https://cities-trip.ru/trip/chudesnye-xramy-i-svyatyni-yaroslavlya/

    as i see now, on home shown only pages, but not shown categroies from custom post type ‘trip’, maybe problem in custom post types…

    https://joxi.ru/EA4Z5bPCDwR30m

    sorry, any things in russian

    thanks, teh next snippet helpled me

    
    $video = get_attached_media('video', get_the_ID() );
    $first = array_shift($video);
    $kgvid_postmeta = get_post_meta($first->ID , "_kgvid-meta", true);
              
    
                if ( !empty($kgvid_postmeta) 
                	&& is_array($kgvid_postmeta) 
                	&& array_key_exists('starts', $kgvid_postmeta) 
                ) {
                	echo 'Views: '.$kgvid_postmeta['starts'];
                }
    

    not post id of video, but attached media id ))

    this code $kgvid_postmeta = get_post_meta(get_the_ID(), "_kgvid-meta", true);

    returns string(0);

    following code

    $kgvid_postmeta = kgvid_get_attachment_meta( get_the_ID() );

    returns default array, as i see from source of plugin

    array(41) { ["embed"]=> string(12) "Single Video" ["width"]=> string(0) "" ["height"]=> string(0) "" ["actualwidth"]=> string(0) "" ["actualheight"]=> string(0) "" ["downloadlink"]=> bool(false) ["track"]=> string(0) "" ["starts"]=> string(1) "0" ["play_25"]=> string(1) "0" ["play_50"]=> string(1) "0" ["play_75"]=> string(1) "0" ["completeviews"]=> string(1) "0" ["pickedformat"]=> string(0) "" ["encodefullres"]=> string(0) "" ["encode1080"]=> string(0) "" ["encode720"]=> string(0) "" ["encodemobile"]=> string(0) "" ["encodewebm"]=> string(0) "" ["encodeogg"]=> string(0) "" ["encodecustom_h264"]=> string(0) "" ["encodecustom_webm"]=> string(0) "" ["encodecustom_ogg"]=> string(0) "" ["encodecustom"]=> string(0) "" ["rotate"]=> string(0) "" ["autothumb-error"]=> string(0) "" ["numberofthumbs"]=> string(2) "10" ["randomize"]=> string(0) "" ["forcefirst"]=> string(0) "" ["featured"]=> string(2) "on" ["thumbtime"]=> string(0) "" ["lockaspect"]=> string(2) "on" ["showtitle"]=> string(0) "" ["gallery_thumb_width"]=> string(3) "250" ["gallery_exclude"]=> string(0) "" ["gallery_include"]=> string(0) "" ["gallery_orderby"]=> string(0) "" ["gallery_order"]=> string(0) "" ["gallery_id"]=> string(0) "" ["duration"]=> string(0) "" ["aspect"]=> string(0) "" ["original_replaced"]=> string(0) "" }

    get same problem

    when i tryin

     $postmeta = get_post_meta(get_the_ID());
      var_dump( $postmeta );

    i get only

    array(6) { ["inline_featured_image"]=> array(1) { [0]=> string(1) "0" } ["_edit_lock"]=> array(1) { [0]=> string(12) "1499598881:2" } ["_thumbnail_id"]=> array(1) { [0]=> string(3) "545" } ["_edit_last"]=> array(1) { [0]=> string(1) "2" } ["_encloseme"]=> array(3) { [0]=> string(1) "1" [1]=> string(1) "1" [2]=> string(1) "1" } ["_kgvid_first_embedded_video"]=> array(1) { [0]=> string(124) "a:2:{s:4:"atts";s:0:"";s:7:"content";s:78:"https://twinkspire.com/elefant/wp-content/uploads/showing-it-off-TwinkSpire.mp4";}" } }

    array key _kgvid-meta is not present

Viewing 5 replies - 1 through 5 (of 5 total)