Tagged: x
-
AuthorPosts
-
July 23, 2016 at 10:55 am #1099925
Pollito69ParticipantHello,
I’m getting Bool(true) on top of the post carousel in my home page, and I don’t know how it got there. Could you please tell me how to get rid of it?
the site is: http://staging.uniquegiftsandart.com/
Please see the attachment.
Thanks!
July 23, 2016 at 11:22 am #1099929
ThaiModeratorHi There,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link login to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
July 23, 2016 at 5:02 pm #1100123
Pollito69ParticipantThis reply has been marked as private.July 23, 2016 at 11:47 pm #1100376
Rue NelModeratorHi There,
Thanks for providing the information. Regretfully we could not connect to your ftp. The password seems to be invalid. Please double check it for us. I am guessing the “bool(true)” comes from your template override. For the meantime, please make sure that the contents of the
_post-carousel.phpin your child theme. The default code is this:<?php // ============================================================================= // VIEWS/ETHOS/_POST-CAROUSEL.PHP // ----------------------------------------------------------------------------- // Outputs the post carousel that appears at the top of the masthead. // ============================================================================= GLOBAL $post_carousel_entry_id; $post_carousel_entry_id = get_the_ID(); $is_enabled = x_get_option( 'x_ethos_post_carousel_enable' ) == '1'; $count = x_get_option( 'x_ethos_post_carousel_count' ); $display = x_get_option( 'x_ethos_post_carousel_display' ); switch ( $display ) { case 'most-commented' : $args = array( 'post_type' => 'post', 'posts_per_page' => $count, 'orderby' => 'comment_count', 'order' => 'DESC' ); break; case 'random' : $args = array( 'post_type' => 'post', 'posts_per_page' => $count, 'orderby' => 'rand' ); break; case 'featured' : $args = array( 'post_type' => 'post', 'posts_per_page' => $count, 'orderby' => 'date', 'meta_key' => '_x_ethos_post_carousel_display', 'meta_value' => 'on' ); break; } ?> <?php if ( $is_enabled ) : ?> <ul class="x-post-carousel unstyled"> <?php $wp_query = new WP_Query( $args ); ?> <?php if ( $wp_query->have_posts() ) : ?> <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?> <li class="x-post-carousel-item"> <?php x_ethos_entry_cover( 'post-carousel' ); ?> </li> <?php endwhile; ?> <?php endif; ?> <?php wp_reset_query(); ?> <script> jQuery(document).ready(function() { jQuery('.x-post-carousel').slick({ speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_large' ); ?>, slidesToScroll : 1, rtl : <?php echo json_encode( is_rtl() ); ?>, responsive : [ { breakpoint : 1500, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_large' ); ?> } }, { breakpoint : 1200, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_medium' ); ?> } }, { breakpoint : 979, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_small' ); ?> } }, { breakpoint : 550, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_small' ); ?> } } ] }); }); </script> </ul> <?php endif; ?>Please let us know how it goes.
July 24, 2016 at 12:45 am #1100407
Pollito69ParticipantHello,
Thanks for checking. I reset the ftp password to the same I gave you before so it should work.
I also checked the _post-carousel.php and it seems to be the same as the one you show above, except it displays products from my shop, which is the way I want it. But do please check it again just in case. I still cannot find a way to get rid of the Bool(true) at the top. I appreciate your help.Thanks!
July 24, 2016 at 2:39 am #1100462
ChristopherModeratorThis reply has been marked as private.July 24, 2016 at 10:06 am #1100719
Pollito69ParticipantThis reply has been marked as private.July 24, 2016 at 10:30 am #1100733
ThaiModeratorHi There,
Everything should be fine now.
I comment out this code
var_dump($wp_query->have_posts());on the line 53 of this file: /wp-content/themes/x-child/framework/views/ethos/_post-carousel.php.Cheers!
July 24, 2016 at 2:34 pm #1100919
Pollito69ParticipantYes, it looks good. Thanks for your help.
July 24, 2016 at 8:02 pm #1101178
Rue NelModeratorYou’re welcome! We’re happy to help you out.
If you need anything else we can help you with, don’t hesitate to open another thread. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1099925 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
