Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #904370
    zendog22
    Participant

    Hi guys, I’m trying to set my blog page so the it has a sidebar. I would also like to remove the shadow border around the blogs.
    I have set the Blog page as my Posts Page and I hvae changed the template to layout – content left, sidebar right. But this makes no difference.
    Please can you help me add sidebar to blog page and remove shadow?
    many thanks!
    http://kentishandco.staging.wpengine.com/blog/

    #905273
    Paul R
    Moderator

    Hi,

    Thanks for writing in!

    1. To remove the shadow, you can add this under Custom > Edit Global CSS in the Customizer.

    
    .single-post article.comment,
    .single-post .entry-wrap,
    .blog .entry-wrap {
        box-shadow:none;
    }
    

    2. You also need to set your blog layout to use the global content layout

    http://screencast.com/t/nsx1UqDHRd

    Hope that helps.

    #905339
    zendog22
    Participant

    Hi, thanks, that helped to remove the shadow.
    However my blog is already set to the global content layout and it doesn’t show the sidebar. Please can you help investigate a bit more?
    The search box and recent posts should be showing up but aren’t.
    many thanks

    #906356
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! The sidebar may not be showing because your Global Content Layout is set to fullwidth. You can check this in the customizer, Appearance > Customize > Layout & Design > Content Layout. To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password

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

    Thank you.

    #906707
    zendog22
    Participant
    This reply has been marked as private.
    #906709
    zendog22
    Participant
    This reply has been marked as private.
    #906711
    zendog22
    Participant

    I have sent them in two private messages. Also just to say that I only want the sidebar to appear on a blog and a news page. Not the homepage or any others.
    many thanks!

    #907463
    Rue Nel
    Moderator

    Hello There,

    Thanks for the clarifications!

    To display the sidebar only on the blog page, please follow this topic: https://community.theme.co/forums/topic/add-sidebar-to-blog/#post-274362

    Hope this helps. Kindly let us know.

    #907678
    zendog22
    Participant

    Hi, the topic doesn’t make sense to me. I am not sure which bit of the topic I am required to follow.

    #907909
    Rupok
    Member

    Hi there,

    Thanks for writing back. That’s already specified on the URL (#post-274362). Kindly read a bit on previous reply then you will find that it’s similar to your issue.

    Thanks for your patience.

    Cheers!

    #907960
    zendog22
    Participant

    The post just says, “After your child theme is setup, add the code below in your child theme functions.php file” but please can you give instructions on how to add the code to functions.php. I am using the x child theme. thanks

    #907973
    zendog22
    Participant

    I think Ive found it in appearance – editor

    I have added and am gettign this message:
    Fatal error: Cannot redeclare x_get_content_layout() (previously declared in /nas/content/staging/kentishandco/wp-content/themes/x-child/functions.php:28) in /nas/content/staging/kentishandco/wp-content/themes/x-child/functions.php on line 125

    #907974
    zendog22
    Participant

    Please advise urgently if possible. Anything I do, I now get this error. You have my log in if you could please log in and help.

    #907978
    zendog22
    Participant

    I added this code and now everything has crashed with the error message above.

    function x_get_content_layout() {

    $content_layout = x_get_option( ‘x_layout_content’, ‘content-sidebar’ );

    if ( $content_layout != ‘full-width’ ) {
    if ( is_home() ) {
    $opt = x_get_option( ‘x_blog_layout’, ‘sidebar’ );
    $layout = ( $opt == ‘sidebar’ ) ? $content_layout : $opt;
    } elseif ( is_singular( ‘post’ ) ) {
    $layout = ‘content-sidebar’;
    } 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’, ‘sidebar’ );
    $layout = ( $opt == ‘sidebar’ ) ? $content_layout : $opt;
    } else {
    $opt = x_get_option( ‘x_archive_layout’, ‘sidebar’ );
    $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’, ‘sidebar’ );
    $layout = ( $opt == ‘sidebar’ ) ? $content_layout : $opt;
    } elseif ( x_is_buddypress() ) {
    $opt = x_get_option( ‘x_buddypress_layout_content’, ‘sidebar’ );
    $layout = ( $opt == ‘sidebar’ ) ? $content_layout : $opt;
    } elseif ( is_404() ) {
    $layout = ‘full-width’;
    } else {
    $layout = $content_layout;
    }
    } else {
    $layout = $content_layout;
    }

    return $layout;

    }

    function x_get_content_layout() {

    $content_layout = x_get_option( ‘x_layout_content’, ‘content-sidebar’ );

    if ( $content_layout != ‘full-width’ ) {
    if ( is_home() ) {
    $opt = x_get_option( ‘x_blog_layout’, ‘sidebar’ );
    $layout = ( $opt == ‘sidebar’ ) ? $content_layout : $opt;
    } elseif ( is_singular( ‘post’ ) ) {
    //$layout = ‘content-sidebar’;
    $opt = x_get_option( ‘x_archive_layout’, ‘sidebar’ );
    $layout = ( $opt == ‘sidebar’ ) ? $content_layout : $opt;
    } 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’, ‘sidebar’ );
    $layout = ( $opt == ‘sidebar’ ) ? $content_layout : $opt;
    } else {
    $opt = x_get_option( ‘x_archive_layout’, ‘sidebar’ );
    $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’, ‘sidebar’ );
    $layout = ( $opt == ‘sidebar’ ) ? $content_layout : $opt;
    } elseif ( x_is_buddypress() ) {
    $opt = x_get_option( ‘x_buddypress_layout_content’, ‘sidebar’ );
    $layout = ( $opt == ‘sidebar’ ) ? $content_layout : $opt;
    } elseif ( is_404() ) {
    $layout = ‘full-width’;
    } else {
    $layout = $content_layout;
    }
    } else {
    $layout = $content_layout;
    }

    return $layout;

    }

    #907979
    zendog22
    Participant

    I don’t know how to remove the code to access my admin.

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