Videoly Theme selectors issues
-
I can’t find the selectors for my Videoly Theme 😐 I have tryed everything i feel bad.
The page I need help with: [log in to see the link]
-
Hi @quemocapt
I have recently improved documentation for the plugin.
I hope it helps. Look forward to your feedback on the guide if you still have any issues.
Thank you.
Sébastien
currently i have div#container h1.c-h1 tt-blog-nav i feel that i’m failing at something. That or it’s a theme problem. Can you point me in the right direction?
Have you looked at all the documentation? Was there anything that you did not understand?
No, documentation is very good and well constructed. It doesn’t work because the selectors are wrong?
From what I can see in the dom, try the following for your theme selectors.
Copy and paste the selectors as is.
Content Container:
div#container .col-md-8
Post Title:h1.c-h1
Post Navigation:.tt-blog-navThanks a lot for that i really appreciate the time you took to take a look at it. It’s still not working, nothing is loading, so i guess is something to do with the container selector?
You may need to apply this filter next.
So.. The filter didn’t work tryed a lot of theme locations, so i tryed to make a Repeater template and it looks like this.
<?php <? if ( have_posts() ) : // Load content before the loop. do_action( 'alnp_load_before_loop' ); // Check that there are posts to load. <? <?php while ( have_posts() ) : the_post(); ?> $post_format = get_post_format(); // Post Format e.g. video $post_type = alnp_get_post_type(); // Post Type e.g. single // Load content before the post content. do_action( 'alnp_load_before_content' ); // Load content before the post content for a specific post format. do_action( 'alnp_load_before_content_post_format_' . $post_format ); // Load content before the post content for a specific post type. do_action( 'alnp_load_before_content_post_type_' . $post_type ); <?php videoly_setPostViews(get_the_ID()); ?> <article <?php post_class(); ?>> <!-- TT-BLOG-CATEGORY --> <div class="tt-blog-category post-single text-center"> <?php $category = get_the_category(); if(is_array($category) && !empty($category)): foreach($category as $cat): ?> <a class="c-btn type-3 color-3" href="<?php echo esc_url(get_category_link($cat->term_id)); ?>"><?php echo esc_html($cat->cat_name); ?></a> <?php endforeach; endif; ?> </div> <div class="empty-space marg-lg-b10"></div> <h1 class="c-h1 text-center"><?php the_title(); ?></h1> <div class="empty-space marg-lg-b5"></div> <!-- TT-BLOG-USER --> <div class="text-center"> <div class="tt-blog-user clearfix"> <a class="tt-blog-user-img" href="#"> <?php echo get_avatar( get_the_author_meta('ID'), 40 ); ?> </a> <div class="tt-blog-user-content"> <span><a href="#"><?php echo get_the_author(); ?></a></span> <span><?php echo get_the_date('M d' ); ?></span> </div> </div> </div> <div class="empty-space marg-lg-b10"></div> <!-- TT-DEVIDER --> <div class="tt-devider"></div> <div class="empty-space marg-lg-b20"></div> <?php get_template_part('templates/blog/blog-single/parts/single', 'media'); ?> <div class="empty-space marg-lg-b40 marg-sm-b30"></div> <div class="simple-text size-4 title-droid margin-big"> <?php the_content(); ?> </div> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'videoly' ), 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', ) ); ?> <div class="empty-space marg-lg-b40 marg-sm-b30"></div> <?php the_tags( '<span class="tt-tag-title">'.esc_html__('Tags:', 'videoly').'</span><ul class="tt-tags"><li>', '</li><li>', '</li></ul>' ); ?> </article> // Load content after the post content for a specific post type. do_action( 'alnp_load_after_content_post_type_' . $post_type ); // Load content after the post content for a specific post format. do_action( 'alnp_load_after_content_post_format_' . $post_format ); // Load content after the post content. do_action( 'alnp_load_after_content' ); // End the loop. <?php endwhile; ?> // Load content after the loop. <div class="empty-space marg-lg-b50 marg-sm-b30"></div> <?php videoly_post_navigation(); ?> <div class="tt-devider"></div> <div class="empty-space marg-lg-b55 marg-sm-b50 marg-xs-b30"></div> <div class="empty-space marg-lg-b80 marg-sm-b50 marg-xs-b30"></div> do_action( 'alnp_load_after_loop' ); else : // Load content if there are no more posts. do_action( 'alnp_no_more_posts' ); endif; // END if have_posts()And the Calls for templates direct to here:
<?php get_template_part(‘templates/blog/blog-single/parts/single’, ‘media’); ?><?php /** * Single Meida File * * @package videoly * @since 1.0 */ ?> <?php global $post; $post_format = get_post_format(); $image_src = wp_get_attachment_image_src( get_post_thumbnail_id(), 'videoly-big'); $video_url = videoly_get_post_opt('post-video-url'); switch ($post_format) { case 'audio': break; case 'video': if(!empty($video_url)): ?> <div class="tt-fluid"> <div class="tt-fluid-inner"> <iframe class="tt-fluid-inner-iframe tt-iframe" width="960" height="720" src="<?php echo esc_url($video_url); ?>" frameborder="0" allowfullscreen></iframe> </div> </div> <?php endif; break; case 'gallery': break; default: ?> <?php if(is_array($image_src) && !empty($image_src)): ?> <a class="tt-thumb" href="<?php echo esc_url($image_src[0]); ?>"> <img class="img-responsive" src="<?php echo esc_url($image_src[0]); ?>" alt=""> <span class="tt-thumb-icon"> <i class="fa fa-arrows-alt" aria-hidden="true"></i> </span> </a> <?php endif; ?> <?php break; }And this
<?php videoly_post_navigation(); ?> /** * Post Navigation * @param type $type * @return array */ if(!function_exists('videoly_post_navigation')) { function videoly_post_navigation() { $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if(empty($previous) && empty($next)) { return; } ?> <!-- TT-NAV --> <div class="row"> <?php if (get_previous_post()): ?> <div class="col-sm-6"> <div class="tt-blog-nav left"> <div class="tt-blog-nav-label"><?php esc_html_e('Previous Article', 'videoly'); ?></div> <?php previous_post_link('%link', '%title'); ?> </div> <div class="empty-space marg-xs-b20"></div> </div> <?php endif; ?> <?php if (get_next_post()): ?> <div class="col-sm-6"> <div class="tt-blog-nav right"> <div class="tt-blog-nav-label"><?php esc_html_e('Next Article', 'videoly'); ?></div> <?php next_post_link('%link', '%title'); ?> </div> </div> <?php endif; ?> </div> <div class="empty-space marg-lg-b55 marg-sm-b50 marg-xs-b30"></div> <?php } }What am i doing wrong?
Is there hope for Videoly?Basicly that Repeater code is my Videoly/templates/blog/blog-single/layout/default.php, but i removed the ability to search for sidebar and so on, and trying to force auto load next post on the DIV col-md-8 . The page in question is format Video and type default.
The problem is the same, nothing happens, it’s like plugin is non-existant/not installed.
Just wondering do i need to add shorcode to call the plugin to work? I’m lost-
This reply was modified 7 years, 3 months ago by
quemocapt.
So based on the information you have shared it’s possible your template location was correct but the theme has labelled the file of the content to something else that Auto Load Next Post does not recognise so overriding the repeater template will also be required on top.
Assuming you have done so already, copying the default repeater template from the plugin and placing it into your theme (prefereably in child-theme so you are able to accept future theme updates).
wp-content/plugins/auto-load-next-post/template/content-alnp.phptowp-content/themes/yourtheme/auto-load-next-post/content-alnp.phpThen in the repeater template you have copied rename the word
contenttosingle. See highlighted lines to change.Filter
function my_template_location() { return 'templates/blog/blog-single/parts/'; } add_filter( 'alnp_template_location', 'my_template_location' );-
This reply was modified 7 years, 3 months ago by
Sébastien Dumont.
It didn’t work. Nothing has changed.
So, this is what i have done so far.
1-
This is my theme selectors: https://imgur.com/9WJKjdw
This is my Misc Tab: https://imgur.com/pRc5Odj
2-
Added Filter to functions.php that is in root directory of theme videoly/
Added it to *almost* end of filefunction my_template_location() { return 'templates/blog/blog-single/parts/'; } add_filter( 'alnp_template_location', 'my_template_location' );3-
I copy the default repeater template from the plugin and placed into wp-content/themes/videoly/auto-load-next-post/content-alnp.php
And Changed it to:<?php /** * The Template for displaying a post when called. * * This template can be overridden by copying it to yourtheme/auto-load-next-post/content-alnp.php. * * HOWEVER, on occasion Auto Load Next Post will need to update template files and you * (the theme developer) will need to copy the new files to your theme to * maintain compatibility. I try to do this as little as possible, but it does * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * * @author Sébastien Dumont * @package Auto Load Next Post/Templates * @license GPL-2.0+ * @version 1.5.0 */ if ( have_posts() ) : // Load content before the loop. do_action( 'alnp_load_before_loop' ); // Check that there are posts to load. while ( have_posts() ) : the_post(); $post_format = get_post_format(); // Post Format e.g. video $post_type = alnp_get_post_type(); // Post Type e.g. single // Load content before the post content. do_action( 'alnp_load_before_content' ); // Load content before the post content for a specific post format. do_action( 'alnp_load_before_content_post_format_' . $post_format ); // Load content before the post content for a specific post type. do_action( 'alnp_load_before_content_post_type_' . $post_type ); if ( false === $post_format ) { /* * Include the Post-Type-specific template for the content. * content-___.php (where ___ is the Post Type name). */ if ( locate_template( alnp_template_location() . 'single-' . $post_type . '.php') != '' ) { get_template_part( alnp_template_location() . 'single', $post_type ); } else { // If no specific post type found then fallback to standard content.php file. get_template_part( alnp_template_location() . 'single' ); } } else { /* * Include the Post-Format-specific template for the content. * called format-___.php (where ___ is the Post Format name). */ if ( locate_template( alnp_template_location() . 'format-' . $post_format . '.php' ) != '' ) { get_template_part( alnp_template_location() . 'format', $post_format ); } else { // If no format-{post-format}.php file found then fallback to content-{post-format}.php get_template_part( alnp_template_location() . 'single', $post_format ); } } // Load content after the post content for a specific post type. do_action( 'alnp_load_after_content_post_type_' . $post_type ); // Load content after the post content for a specific post format. do_action( 'alnp_load_after_content_post_format_' . $post_format ); // Load content after the post content. do_action( 'alnp_load_after_content' ); // End the loop. endwhile; // Load content after the loop. do_action( 'alnp_load_after_loop' ); else : // Load content if there are no more posts. do_action( 'alnp_no_more_posts' ); endif; // END if have_posts()—————————————————————-
I’m not really sure why it’s not working, but i’m open to any idea.
Here is templates/blog/blog-single/parts/single-video.php code:<?php /** * Single Meida File * * @package videoly * @since 1.0 */ ?> <?php global $post; $post_format = get_post_format(); $image_src = wp_get_attachment_image_src( get_post_thumbnail_id(), 'videoly-big'); $video_url = videoly_get_post_opt('post-video-url'); switch ($post_format) { case 'audio': break; case 'video': if(!empty($video_url)): ?> <div class="tt-fluid"> <div class="tt-fluid-inner"> <iframe class="tt-fluid-inner-iframe tt-iframe" width="960" height="720" src="<?php echo esc_url($video_url); ?>" frameborder="0" allowfullscreen></iframe> </div> </div> <?php endif; break; case 'gallery': break; default: ?> <?php if(is_array($image_src) && !empty($image_src)): ?> <a class="tt-thumb" href="<?php echo esc_url($image_src[0]); ?>"> <img class="img-responsive" src="<?php echo esc_url($image_src[0]); ?>" alt=""> <span class="tt-thumb-icon"> <i class="fa fa-arrows-alt" aria-hidden="true"></i> </span> </a> <?php endif; ?> <?php break; }Here is the layout on Theme that i am trying to make it work
templates/blog/blog-single/layout/default.php?php /** * Blog Default * * @package videoly * @since 1.0 */ ?> <div class="container"> <div class="empty-space marg-lg-b60 marg-sm-b40 marg-xs-b30"></div> <?php get_template_part('templates/global/page-before-content'); ?> <?php while ( have_posts() ) : the_post(); ?> <?php videoly_setPostViews(get_the_ID()); ?> <article <?php post_class(); ?>> <!-- TT-BLOG-CATEGORY --> <div class="tt-blog-category post-single text-center"> <?php $category = get_the_category(); if(is_array($category) && !empty($category)): foreach($category as $cat): ?> <a>term_id)); ?>"><?php echo esc_html($cat->cat_name); ?></a> <?php endforeach; endif; ?> </div> <div class="empty-space marg-lg-b10"></div> <h1 class="c-h1 text-center"><?php the_title(); ?></h1> <div class="empty-space marg-lg-b5"></div> <!-- TT-BLOG-USER --> <div class="text-center"> <div class="tt-blog-user clearfix"> <a href="#"> <?php echo get_avatar( get_the_author_meta('ID'), 40 ); ?> </a> <div class="tt-blog-user-content"> <span><a href="#"><?php echo get_the_author(); ?></a></span> <span><?php echo get_the_date('M d' ); ?></span> </div> </div> </div> <div class="empty-space marg-lg-b10"></div> <?php videoly_social_share('style1'); ?> <!-- TT-DEVIDER --> <div class="tt-devider"></div> <div class="empty-space marg-lg-b20"></div> <?php get_template_part('templates/blog/blog-single/parts/single', 'media'); ?> <div class="empty-space marg-lg-b40 marg-sm-b30"></div> <div class="simple-text size-4 title-droid margin-big"> <?php the_content(); ?> </div> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'videoly' ), 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', ) ); ?> <div class="empty-space marg-lg-b40 marg-sm-b30"></div> <?php the_tags( '<span class="tt-tag-title">'.esc_html__('Tags:', 'videoly').'</span><ul class="tt-tags"><li>', '</li><li>', '</li></ul>' ); ?> </article> <?php endwhile; ?> <div class="empty-space marg-lg-b50 marg-sm-b30"></div> <?php videoly_post_author_details(); ?> <?php videoly_post_navigation(); ?> <?php videoly_related_post(); ?> <div class="tt-devider"></div> <div class="empty-space marg-lg-b55 marg-sm-b50 marg-xs-b30"></div> <?php if ( comments_open() || get_comments_number() ) : comments_template(); endif; ?> <?php get_template_part('templates/global/page-after-content'); ?> <div class="empty-space marg-lg-b80 marg-sm-b50 marg-xs-b30"></div> </div>Here is my templates/global/page-before-content.php code:
?php /** * Before Loop ( page.php ) * * @package videoly */ $layout = (is_archive() || is_search()) ? 'right_sidebar':videoly_get_opt('main-layout'); $col_class = is_single() || is_home() ? 'col-md-8 col-md-offset-2':'col-md-12'; if ($layout == 'left_sidebar'): ?> <div class="row"> <?php get_sidebar(); ?> <div class="col-md-8"> <?php elseif ($layout == 'right_sidebar'): ?> <div class="row"> <div class="col-md-8"> <?php else: ?> <div class="row"> <div class="<?php echo videoly_sanitize_html_classes($col_class);?>"> <?php endif; ?>Here is my templates/global/page-after-content.php code:
<?php /** * * @package videoly */ $layout = (is_archive() || is_search()) ? 'right_sidebar':videoly_get_opt('main-layout'); if ($layout == 'left_sidebar'): ?> </div> </div><!-- .row --> <?php elseif ($layout == 'right_sidebar'): ?> </div> <?php get_sidebar(); ?> </div><!-- .row --> <?php else: ?> </div> </div> <?php endif; ?>And i noticed this Folder named “Content” on videoly, maybe this is the content that repeater should grab.
Located on templates/content/content-page.php here goes code:<?php /** * Content Page * * @package videoly * @since 1.0 */ get_template_part('templates/global/page-before-content'); while ( have_posts() ) : the_post(); the_content(); wp_link_pages( array( 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'videoly' ), 'after' => '</div>', ) ); // If comments are open or we have at least one comment, load up the comment template if ((comments_open() || get_comments_number()) ) : comments_template(); endif; endwhile; get_template_part('templates/global/page-after-content');And to end this is my single.php code located on Root directory of theme:
<?php /** * Single.php * * @package videoly * @since 1.0 */ get_header(); videoly_blog_post_template(videoly_get_opt('post-style')); get_footer();All this i’v sent you might help pin-point the problem. And thanks a lot in advance, i owe you big time
“This post has been held for moderation by our automated system and will be manually reviewed by a moderator.”
Is hope my last post with some code is visible to you 🙂If you are still having issues @quemocapt then I recommend using my theme support service.
ok, i sent you a pre-sales question, hmmm
-
This reply was modified 7 years, 3 months ago by
The topic ‘Videoly Theme selectors issues’ is closed to new replies.