Tagged: x
-
AuthorPosts
-
November 26, 2016 at 2:35 pm #1271623
ThemeXuserParticipantHello,
I would like to use The Grid as to show woocommerce products when categories or tags are clicked. I have it set up for the search results but i can’t find the correct template to edit.
The Grid documentation shows just to replace the default loop with:
The_Grid('My Grid Name', true);and place it in the theme-folder/woocommerce/archive-product.php but i don’t see that path in the X folder.1. Looking for the file to edit
2. Where do i place it once i add The Grid loop.Thank you
November 26, 2016 at 8:30 pm #1271838
Rue NelModeratorHello There,
Thanks for writing in! The file is non existent in the X theme because there is no template override for that template in X. You need to copy the file from wp-content/plugins/woocommerce/templates/archive-product.php and place it in your child theme’s folder wp-content/themes/x-child/woocommerce/templates/archive-product.php
To know more about how you can modify a WooCommerce template, please check this out:
https://docs.woocommerce.com/document/template-structure/
https://docs.woocommerce.com/documentation/plugins/woocommerce/woocommerce-codex/theming/Hope this helps.
December 3, 2016 at 12:40 pm #1279940
ThemeXuserParticipantThanks, I got that to work.
I would like to display custom text on the top of the search results, tag archive and category pages – how do i add that?
For example: “you searched for TOYS” when someone searches for toys. Or “All results for TOYS” when the TOYS tag is clicked.December 3, 2016 at 9:36 pm #1280225
Rue NelModeratorHello There,
Thanks for writing in! To display custom text on the top of the search results, tag archive and category pages, 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/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 = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); ?> <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; ?>Feel free to change the “Search Results” into your own text like “you searched for TOYS” which you can find in the code above.
3] Save the file named as
_landmark-header.php
4] Upload this file to your server in the child theme’s folder
wp-content/themes/x-child/framework/views/renew/We would loved to know if this has work for you. Thank you.
December 10, 2016 at 10:12 am #1288361
ThemeXuserParticipantI did as you said and got the following error when trying to load my website:
Parse error: syntax error, unexpected ‘__x__’ (T_STRING) in wp-content/themes/x-child/framework/views/renew/_landmark-header.php on line 55December 10, 2016 at 10:34 am #1288378
ThaiModeratorHi There,
In this case, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link login to your site
– WordPress Admin username / Password
– FTP AccountDon’t forget to select Set as a private reply. This ensures your information is only visible to our staff.
Thanks.
December 10, 2016 at 10:37 am #1288381
ThemeXuserParticipantThis reply has been marked as private.December 10, 2016 at 10:43 am #1288384
ThaiModeratorHi There,
The password is incorrect.
Could you please double check?
Thanks.
December 10, 2016 at 1:15 pm #1288449
ThemeXuserParticipantThis reply has been marked as private.December 10, 2016 at 7:24 pm #1288710
RadModeratorHi there,
Please provide the FTP login credentials. It’s the only way we could check the error. Plus, your provided login has no full access on theme editing.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1271623 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
