Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1099925
    Pollito69
    Participant

    Hello,

    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!

    #1099929
    Thai
    Moderator

    Hi 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 credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1100123
    Pollito69
    Participant
    This reply has been marked as private.
    #1100376
    Rue Nel
    Moderator

    Hi 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.php in 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.

    #1100407
    Pollito69
    Participant

    Hello,

    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!

    #1100462
    Christopher
    Moderator
    This reply has been marked as private.
    #1100719
    Pollito69
    Participant
    This reply has been marked as private.
    #1100733
    Thai
    Moderator

    Hi 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!

    #1100919
    Pollito69
    Participant

    Yes, it looks good. Thanks for your help.

    #1101178
    Rue Nel
    Moderator

    You’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.

  • <script> jQuery(function($){ $("#no-reply-1099925 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>