Tagged: x
-
AuthorPosts
-
June 22, 2016 at 1:34 am #1053834
bedingfieldParticipantHi there,
Is there an easy way, once on the ‘tag archive’ page to show what ‘tag’ posts you are viewing?
So at the top left of my page I have ‘Tag Archive’, I would like it to show ‘Tag Archive: Races’ for example. Or something similar.
http://elyrunners.club/tag/race-report/
Also, would you mind telling mw what PHP page controls this page as I would like to replicate the style of my blog page…
http://elyrunners.club/2016/03/20/turing-trail-relay-ely-cambs/
Thank you.
June 22, 2016 at 5:28 am #1054070
ThaiModeratorHi There,
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 navigate to your child theme’s /framework/views/renew directory create a file named _landmark-header.php and paste the code below:<?php // ============================================================================= // VIEWS/RENEW/_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 ); $breadcrumbs = x_get_option( 'x_breadcrumb_display' ); ?> <?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 : ?> <header class="x-header-landmark"> <div class="x-container max width"> <div class="x-landmark-breadcrumbs-wrap"> <div class="x-landmark"> <?php if ( x_is_shop() || x_is_product() ) : ?> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_shop_title' ); ?></span></h1> <?php elseif ( x_is_bbpress() ) : ?> <h1 class="h-landmark"><span><?php echo get_the_title(); ?></span></h1> <?php elseif ( x_is_buddypress() ) : ?> <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?> <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1> <?php endif; ?> <?php elseif ( is_page() ) : ?> <h1 class="h-landmark entry-title"><span><?php the_title(); ?></span></h1> <?php elseif ( is_home() || is_single() ) : ?> <?php if ( x_is_portfolio_item() ) : ?> <h1 class="h-landmark"><span><?php echo x_get_parent_portfolio_title(); ?></span></h1> <?php else : ?> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1> <?php endif; ?> <?php elseif ( is_search() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1> <?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__' ); ?> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <?php elseif ( is_tag() || x_is_portfolio_tag() || x_is_product_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = single_tag_title( __( 'Tag Archive: ', '__x__' ) , false); ?> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <?php elseif ( is_404() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1> <?php elseif ( is_year() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1> <?php elseif ( is_month() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1> <?php elseif ( is_day() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1> <?php elseif ( x_is_portfolio() ) : ?> <h1 class="h-landmark"><span><?php the_title(); ?></span></h1> <?php endif; ?> </div> <?php if ( $breadcrumbs == '1' ) : ?> <?php if ( ! is_front_page() && ! x_is_portfolio() ) : ?> <div class="x-breadcrumbs-wrap"> <?php x_breadcrumbs(); ?> </div> <?php endif; ?> <?php endif; ?> <?php if ( x_is_portfolio() ) : ?> <div class="x-breadcrumbs-wrap"> <?php x_portfolio_filters(); ?> </div> <?php endif; ?> </div> </div> </header> <?php endif; ?> <?php endif; ?>Also, would you mind telling mw what PHP page controls this page as I would like to replicate the style of my blog page…
Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
June 23, 2016 at 12:45 am #1055809
bedingfieldParticipantHi there,
Thank you for this.
I am trying to replicate this page layout (I designed this myself) for my ‘tag’ and ‘search’ results page – http://elyrunners.club/thames-path-100/
So I just need to know what pages in the X view folder are used for the tag, category and search results please.
Thank you
June 23, 2016 at 4:12 am #1055990
Rue NelModeratorHello There,
In X, it simply uses the x/framework/views/{your-stack}/wp-index.php for the tag, category and search results page. Do you want to display full content in your tag and search results page? If this is the case, since you have your child theme active and ready, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file<?php // ============================================================================= // VIEWS/GLOBAL/_CONTENT.PHP // ----------------------------------------------------------------------------- // Display of the_excerpt() or the_content() for various entries. // ============================================================================= $stack = x_get_stack(); $is_full_post_content_blog = is_home() && x_get_option( 'x_blog_enable_full_post_content' ) == '1'; ?> <?php if ( is_tag() || is_search() || is_singular() || $is_full_post_content_blog ) : x_get_view( 'global', '_content', 'the-content' ); if ( $stack == 'renew' ) : x_get_view( 'renew', '_content', 'post-footer' ); endif; else : x_get_view( 'global', '_content', 'the-excerpt' ); endif; ?>3] Save the file named as
_content.php
4] Upload this file to your server in the child theme’s folder
wp-content/themes/x-child/framework/views/global/Hope this helps.
June 24, 2016 at 3:28 pm #1058509
bedingfieldParticipantHi there,
Essentially, what I am trying to achieve is that the earth, tag, cat results show in the same style page layout as my single blog page layout.
http://elyrunners.club/thames-path-100/
By this I mean a 70% entered width.
This is my code for blog single post…
<?php // ============================================================================= // VIEWS/RENEW/TEMPLATE-BLANK-1.PHP (Container | Header, Footer) // ----------------------------------------------------------------------------- // A blank page for creating unique layouts. // ============================================================================= ?> <?php get_header(); ?> <div class="x-container max width offset"> <div class="x-main full" role="main"> <div class="blog-width" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php x_get_view( 'renew', 'content', get_post_format() ); ?> <?php x_get_view( 'global', '_comments-template' ); ?> <?php endwhile; ?> </div> </div> </div> <?php get_footer(); ?>How do I get wp-index to view like above?
Thank you.
June 24, 2016 at 8:59 pm #1058858
Rue NelModeratorHello There,
To resolve this issue and have a 70% entry width, please find this css block in your customizer,
.single-post .blog-width { margin: 0 auto; width: 70%; }You need to update it and replace it with this code instead:
.single-post .blog-width, .archive.tag .hentry { margin: 0 auto; width: 70%; }Please let us know if this works out for you.
June 25, 2016 at 1:47 am #1059018
bedingfieldParticipantHi there, and thank you.
If I wanted to adjust spacing and size of meta in ‘tag’ results, what CSS controls them?
I would like a little more space between title, date and tags.
Also, I would like to have a dividing line with space between resulting post results. I think currently, they are too close.
http://elyrunners.club/tag/ultra-race/
Thank you.
June 25, 2016 at 2:02 am #1059027
ChristopherModeratorHi there,
Please add this :
p.p-meta { margin-bottom: 10px; }Find this code :
header.entry-header a[rel=tag] { font-size: 12px; padding-top: 6px; padding-right: 10px; padding-bottom: 6px; padding-left: 10px; display: inline-block; background-color: #13475e; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; background-clip: border-box; background-origin: padding-box; background-size: auto auto; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-radius: 4px; color: white; text-transform: uppercase; }And update it to :
header.entry-header a[rel=tag] { font-size: 12px; padding-top: 6px; padding-right: 10px; padding-bottom: 6px; padding-left: 10px; display: inline-block; background-color: #13475e; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; background-clip: border-box; background-origin: padding-box; background-size: auto auto; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-radius: 4px; color: white; text-transform: uppercase; margin-bottom: 10px; }Hope it helps.
June 25, 2016 at 6:00 am #1059149
bedingfieldParticipantThanks,
I would want that CSS specific to search/tag/category results only. How would I do this please?
June 25, 2016 at 6:05 am #1059150
FriechModeratorHi There,
If that is the case, please update the code to:
.archive header.entry-header a[rel=tag], .search header.entry-header a[rel=tag] { font-size: 12px; padding-top: 6px; padding-right: 10px; padding-bottom: 6px; padding-left: 10px; display: inline-block; background-color: #13475e; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; background-clip: border-box; background-origin: padding-box; background-size: auto auto; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-radius: 4px; color: white; text-transform: uppercase; margin-bottom: 10px; }Hope it helps, Cheers!
June 25, 2016 at 4:55 pm #1059502
bedingfieldParticipantGreat, thank you.
I would like to have a dividing line with space between resulting post results (end of excerpt & beginning of next post result) I think currently, they are too close.
Can this be done?
Thank you
June 25, 2016 at 10:58 pm #1059742
Rue NelModeratorHello Again,
Thanks for the updates! To have a dividing line with space between resulting post results, please add the following css code in the customizer, Appearance > Customize > Custom > CSS
.archive.tag .hentry{ padding-bottom: 30px; margin-bottom: 30px; border-bottom: solid 1px red; }
Feel free to change the color of the border and adjust the margin/padding for the spaces around the dividing line.
June 26, 2016 at 1:57 am #1059838
bedingfieldParticipantBrilliant. Thank you so much.
One more page related question… Where it says ‘Tag Archive’, is there a way to let viewer know what archive they are viewing? For example, Tag Archive: Race Reports.
Also, what I have done with my tag archive, I would like to replicate for my search results. What CSS controls search results please?
Thank you for your time.
June 26, 2016 at 2:32 am #1059853
ChristopherModeratorHi there,
Please copy _landmark-header.php from framework/views/renew and put it in the same path inside child theme, replace existing code with following :
<?php // ============================================================================= // VIEWS/RENEW/_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 ); $breadcrumbs = x_get_option( 'x_breadcrumb_display' ); ?> <?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 : ?> <header class="x-header-landmark"> <div class="x-container max width"> <div class="x-landmark-breadcrumbs-wrap"> <div class="x-landmark"> <?php if ( x_is_shop() || x_is_product() ) : ?> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_shop_title' ); ?></span></h1> <?php elseif ( x_is_bbpress() ) : ?> <h1 class="h-landmark"><span><?php echo get_the_title(); ?></span></h1> <?php elseif ( x_is_buddypress() ) : ?> <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?> <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1> <?php endif; ?> <?php elseif ( is_page() ) : ?> <h1 class="h-landmark entry-title"><span><?php the_title(); ?></span></h1> <?php elseif ( is_home() || is_single() ) : ?> <?php if ( x_is_portfolio_item() ) : ?> <h1 class="h-landmark"><span><?php echo x_get_parent_portfolio_title(); ?></span></h1> <?php else : ?> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1> <?php endif; ?> <?php elseif ( is_search() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1> <?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__' ); ?> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <?php elseif ( x_is_portfolio_tag() || x_is_product_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); ?> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <?php elseif ( is_tag()) : ?> <h1 class="h-landmark"><?php echo single_tag_title(); ?></h1> <?php elseif ( is_404() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1> <?php elseif ( is_year() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1> <?php elseif ( is_month() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1> <?php elseif ( is_day() ) : ?> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1> <?php elseif ( x_is_portfolio() ) : ?> <h1 class="h-landmark"><span><?php the_title(); ?></span></h1> <?php endif; ?> </div> <?php if ( $breadcrumbs == '1' ) : ?> <?php if ( ! is_front_page() && ! x_is_portfolio() ) : ?> <div class="x-breadcrumbs-wrap"> <?php x_breadcrumbs(); ?> </div> <?php endif; ?> <?php endif; ?> <?php if ( x_is_portfolio() ) : ?> <div class="x-breadcrumbs-wrap"> <?php x_portfolio_filters(); ?> </div> <?php endif; ?> </div> </div> </header> <?php endif; ?> <?php endif; ?>Find this code :
.archive.tag .hentry { padding-bottom: 30px; margin-bottom: 30px; border-bottom: solid 1px #eeeeee; }And update it to :
.archive.tag .hentry,.search-results .hentry { padding-bottom: 30px; margin-bottom: 30px; border-bottom: solid 1px #eeeeee; }Add this :
.search-results .x-main{ width:100%; } .search-results .x-sidebar{ display:none; }Hope it helps.
June 26, 2016 at 5:24 am #1059928
bedingfieldParticipantPerfect. Thank you. Ideally, I would like it to say ‘Tag Archive For …’
Can this be done?
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1053834 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
