Tagged: x
-
AuthorPosts
-
January 25, 2017 at 4:52 am #1344481
michaelxxxParticipantHi,
Can you please take a look at this page:
https://one-million-places.com/tag/aida-karibik-kreuzfahrtIs it possible to set the width of
<header class="x-header-landmark x-container max width">just as big as the width of
<div class="x-main left" role="main">to move the sidebar up (see screenshot).
January 25, 2017 at 9:04 am #1344744
ThaiModeratorHi There,
Please add the following CSS:
@media (min-width: 980px){ body.tag .x-header-landmark.x-container.max.width { width: 66%; float: left; margin-left: 5%; } body.tag .x-sidebar.right.q2w3-fixed-widget-container { margin-top: -380px; } }Hope it helps 🙂
January 25, 2017 at 9:34 am #1344815
michaelxxxParticipantHi,
thanks, but now the .x-header-landmark is to much left aligned.
I can set margin-left to 10% or 15%, but this can not be the best solution because user have different screen sizes.Is there a better way to add a special tag template to x-child ethos?
January 25, 2017 at 9:36 am #1344821
michaelxxxParticipantand it would be great to have the same styling on category pages like:
https://one-million-places.com/reiseberichte/australien-neuseeland/australienJanuary 25, 2017 at 3:13 pm #1345260
FriechModeratorHi There,
Update the given css code to this.
@media (min-width: 980px){ .x-header-landmark .h-landmark, .x-header-landmark .cat-desc { width: 66%; float: left; } body.tag .x-sidebar.right.q2w3-fixed-widget-container { margin-top: -380px; } }Hope it helps, Cheers!
January 25, 2017 at 3:34 pm #1345300
michaelxxxParticipantNo, I can´t do it with CSS, because every TAG page have different content in the header and so they have different heights.
For example, when I use your CSS code in this TAG site it will not work:
https://one-million-places.com/tag/tauchberichteThis is why I asked you if it is possible to add a special tag template to x-child ethos?
January 25, 2017 at 8:32 pm #1345719
Rue NelModeratorHello There,
Thanks for updating in! Every tag and category has already a special css body selector. Generally, you will have a
tagorcategoryand you can use a css like;body.category element { // your styling here } body.tag element { // your styling here }If you want to target specific tag or category, you can use the specific tag/category slug or tag/category ID. You can have something like this:
body.category-reiseberichte element, body.category-1 element { // your category styling here } body.tag-tauchberichte element body.tag-1221 element { // your tag styling here }It is more like
tag-{slugname}ortag-{#}andcategory-{slugname}orcategory-{#}where the slugname is the slug of the tag/category and the number is the ID of the tag/category.Sitewide, you have have a minimum height of at least 180 pixels for example like this: http://prntscr.com/e0fbuo
You can do that by simply having this code in the customizer, Appearance > Customizer > Custom CSS
header.x-header-landmark.x-container.max.width { min-height: 180px; padding-bottom: 20px; }Hope this helps.
January 26, 2017 at 1:41 am #1345957
michaelxxxParticipantHi,
I know that solution with the tag/category ID.
But I have more tahn 400 different TAG sites and they all have diffenrent heights.
It can´t be the solution, that I now add 400 CSS codes to Custom CSS, or?That´s why I ask to modify the tag template in X child and include the .cat-desc into the main fraime.
You know what I mean?January 26, 2017 at 1:55 am #1345975
Rue NelModeratorHello There,
Thank you for the clarifications. To resolve this, you can do the following steps:
1] Please create a new file in your local computer.
2] Insert the following the code into that file:<?php // ============================================================================= // VIEWS/ETHOS/_LANDMARK-HEADER.PHP // ----------------------------------------------------------------------------- // Handles content output of large headers for key pages such as the blog or // search results. // ============================================================================= $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true ); ?> <?php if ( ! x_is_blank( 1 ) && ! x_is_blank( 2 ) && ! x_is_blank( 4 ) && ! x_is_blank( 5 ) ) : ?> <?php if ( is_page() && $disable_page_title == 'on' ) : ?> <?php else : ?> <?php if ( x_is_shop() || x_is_product() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_ethos_shop_title' ); ?></span></h1> </header> <?php elseif ( x_is_bbpress() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo get_the_title(); ?></span></h1> </header> <?php elseif ( x_is_buddypress() ) : ?> <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1> </header> <?php endif; ?> <?php elseif ( is_page() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark entry-title"><span><?php the_title(); ?></span></h1> </header> <?php elseif ( x_is_portfolio_item() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php the_title(); ?></span></h1> </header> <?php elseif ( is_search() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1> </header> <?php elseif ( is_category() || x_is_portfolio_category() || x_is_product_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="cat-desc"><?php echo category_description(); ?></p> </header> <?php elseif ( is_tag() || x_is_portfolio_tag() || x_is_product_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <p class="cat-desc"><?php echo tag_description(); ?></p> </header> <?php elseif ( is_404() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1> </header> <?php elseif ( is_year() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1> </header> <?php elseif ( is_month() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1> </header> <?php elseif ( is_day() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1> </header> <?php elseif ( x_is_portfolio() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_portfolio_title' ); ?></span></h1> </header> <?php endif; ?> <?php endif; ?> <?php endif; ?>3] Save this file and named it as “_landmark-header.php”
4] You can then upload this file in your child theme’s folder wp-content/themes/x-child/framework/views/ethos/Hope this helps.
January 26, 2017 at 2:34 am #1346003
michaelxxxParticipantHi,
there is no change on the site when I use your code.
I already have an own “_landmark-header.php” file in my x child, so this part is done 🙂
And I also found the code which includes the description in the header on TAG pages:<?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : single_tag_title( '', false ); ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <div class="cat-desc"><?php echo category_description(); ?></div> </header>How can I move that code into main frame
<div class="x-container max width main">?January 26, 2017 at 2:42 am #1346009
michaelxxxParticipantI think I found the solution. I added that code into wp-index.php
January 26, 2017 at 2:53 am #1346019
Rue NelModeratorHello There,
Thanks for updating in! We are just glad that you have figured out a way to resolve the issue.
We really appreciate for letting us know.Cheers.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1344481 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
