Tagged: x
-
AuthorPosts
-
May 13, 2016 at 4:32 am #989418
rayhe51ParticipantThe blog page is http://oceanshower.com/blog/ and is set as the blog posts page from the Settings/Reading page. I believe I have set the sidebar to be on the right.
I tried posting four dummy posts but they show up as black squares like placeholders for videos or pictures; no text. How do I fix this? And the sidebar doesn’t seem to show. I wanted the category links to show in the sidebar on the right.
May 13, 2016 at 4:36 am #989426
rayhe51ParticipantOk. I got the black boxes to go away from the Customize>Blog setting by changing it to standard from the masonry. Is there no way to have the texts show without videos or images in the masonry mode?
But I still don’t know how to get the sidebar to show property with the category links.
Thanks.
May 13, 2016 at 4:38 am #989427
rayhe51ParticipantSorry for the multiple posts…
I forgot to mention that I can have the sidebar show if I change it in the Customize>Style&Design, but that affects the whole site and I don’t know how to limit its effects on the blog page only.
May 13, 2016 at 5:05 am #989451
LelyModeratorHello There,
That is the default setting for masonry. Removing the image will require custom development on the structure which is outside the scope of our support. It’s position is automatically calculated that’s we need some in depth custom changes.
Yes, if you set Content Layout with SIDEBAR, blog index page, single post page and archive pages will have sidebar by default. On the other hand, you can set fullwidth template for pages. If you want to display sidebar on blog index page only, please follow this:
Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Then add the following code on your child theme functions.php file:
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 = 'sidebar-content'; } 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; } return $layout; }For the category links, go to Appearance > Widgets > Select Category Widget and then add it on Main Sidebar.
Hope this helps.
May 13, 2016 at 6:06 am #989532
rayhe51ParticipantHow do I create a Child Theme? And will it just be a copy of the current theme and setting or do I have to customize everything again?
May 13, 2016 at 6:07 am #989535
rayhe51ParticipantAnd is there a way to have “Read more…” show up at the end of the blog post snippets?
May 13, 2016 at 6:10 am #989538
rayhe51ParticipantJust an idea I’ve though of and wondering if this would work…
Setting the default setting in the Customization > Layout and Design to have sidebar on the right. And then for all the pages other than the blog page, set the template to Full Width in the page editors.
May 13, 2016 at 7:06 am #989593
ChristopherModeratorHi there,
#1 Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
#2 Please add following code in child theme’s functions.php :
// Excerpt More String // ============================================================================= if ( ! function_exists( 'x_excerpt_string' ) ) : function x_excerpt_string( $more ) { $stack = x_get_stack(); if ( $stack == 'integrity' ) { return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>'; } else if ( $stack == 'renew' ) { return ' ... <a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>'; } else if ( $stack == 'icon' ) { return ' ...'; } else if ( $stack == 'ethos' ) { return ' ... <a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>'; } } add_filter( 'excerpt_more', 'x_excerpt_string' ); endif;#3 Yes, that’s correct.
Hope it helps.
May 13, 2016 at 11:32 am #989903
rayhe51ParticipantPerfect! Thank you so much once again.
You guys rock.May 13, 2016 at 12:10 pm #989969
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-989418 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
