Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #908393
    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates. To get rid of the error, you need to remove the broken code you have added in your child theme’s functions.php. Would you mind providing us the ftp login credentials so we can take a closer look and fix this issue?

    To do this, you can make a post with the following info:
    – FTP Hostname
    – FTP Username
    – FTP Password

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

    Thank you.

    #908827
    zendog22
    Participant

    Hi, so I have restored my site but please can you advise me of the code that won’t crash my site? I need to have a side bar on the blog page and on pages with individual blogs.
    thanks in advance

    #908970
    Paul R
    Moderator

    Hi,

    You can add this code in your child theme’s functions.php

    
    function x_get_content_layout() {
    
        $content_layout = x_get_option( 'x_layout_content' );
    
        if ( $content_layout != 'full-width' ) {
          if ( is_home() ) {
            $opt    = x_get_option( 'x_blog_layout' );
            $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
          } elseif ( is_singular( 'post' ) ) {
            $meta   = get_post_meta( get_the_ID(), '_x_post_layout', true );
            $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout;
          } elseif ( x_is_portfolio_item() ) {
            $layout = 'full-width';
          } elseif ( x_is_portfolio() ) {
            $meta   = get_post_meta( get_the_ID(), '_x_portfolio_layout', true );
            $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta;
          } elseif ( is_page_template( 'template-layout-content-sidebar.php' ) ) {
            $layout = 'content-sidebar';
          } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) {
            $layout = 'sidebar-content';
          } elseif ( is_page_template( 'template-layout-full-width.php' ) ) {
            $layout = 'full-width';
          } elseif ( is_archive() ) {
            if ( x_is_shop() || x_is_product_category() || x_is_product_tag() ) {
              $opt    = x_get_option( 'x_woocommerce_shop_layout_content' );
              $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
            } else {
              $opt    = x_get_option( 'x_archive_layout' );
              $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
            }
          } elseif ( x_is_product() ) {
            $layout = 'full-width';
          } elseif ( x_is_bbpress() ) {
            $opt    = x_get_option( 'x_bbpress_layout_content' );
            $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
          } elseif ( x_is_buddypress() ) {
            $opt    = x_get_option( 'x_buddypress_layout_content' );
            $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
          } elseif ( is_404() ) {
            $layout = 'full-width';
          } else {
            $layout = $content_layout;
          }
        } else {
          $layout = $content_layout;
          if ( is_home() ||  is_singular( 'post' ) ) {
            $layout = 'content-sidebar';
          }
        }
    
        return $layout;
    
      }
    

    Hope that helps.

    #908976
    zendog22
    Participant

    Do I delete any of the code below before adding the code you have supplied?:

    <?php

    // =============================================================================
    // FUNCTIONS.PHP
    // —————————————————————————–
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================

    // =============================================================================
    // TABLE OF CONTENTS
    // —————————————————————————–
    // 01. Enqueue Parent Stylesheet
    // 02. Additional Functions
    // =============================================================================

    // Enqueue Parent Stylesheet
    // =============================================================================

    add_filter( ‘x_enqueue_parent_stylesheet’, ‘__return_true’ );

    // Additional Functions
    // =============================================================================

    #908980
    zendog22
    Participant

    Hi, I have added the code successfully so please ignore my last question. However I would like help with some more related issues please. I would like to remove the box from the hello world section in the sidebar. And I would like to move the search bar down a bit. Hope you can help.

    I would also like to replicate the sidebar thing on a news page which drills down to individual news items (like the blog page does drilling down to individual blogs). So please can you advise of the code I add then?

    Many thanks in advance! 🙂

    #908995
    zendog22
    Participant

    Just as an add on to my questions above, I’d also like the news page to say – please can you advise how I change the text?

    NEWS
    Read news from the K&C team

    Many thanks!

    #909080
    Christian
    Moderator

    Further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding.

    #909191
    zendog22
    Participant

    Hi Christian, it’s not a further customisation, really. It’s having an identical page but just as news and not blog. Thanks

    #909193
    zendog22
    Participant

    Or even viewed in the simplest of terms, it’s just having another blog type page with a sidebar. Don’t think that’s exactly customisation. Quite basic really. I’m surprised the theme doesn’t offer this functionality straight out.

    #909200
    zendog22
    Participant

    Please can you also tell me how to remove the box from from the hello world section in the sidebar

    #909358
    Joao
    Moderator

    Hi there,

    You can add this under Custom > CSS in the Customizer.

    .widget ul, .widget ol {
    
    border: none !important;
    
    }

    Hope that helps,

    Joao

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