Home › Forums › Themes Support › Claue › Moving Page-header
Tagged: page-header
- This topic has 13 replies, 2 voices, and was last updated 3 years, 8 months ago by Harry.
-
AuthorPosts
-
-
February 21, 2021 at 11:55 pm #40511
Hello! I was wondering if there is a way to move the page-header to the very bottom of the page above the footer on product categories but not blog posts. How do I go about doing this? Is it even possible? Thanks in advance!
-
February 22, 2021 at 1:39 pm #40520
Hi,
Please renew your support at https://themeforest.net/downloads and try add below code to claue-child > functions.php
/* move category description below products */ add_action( 'wp_head', 'remove_my_action' ); function remove_my_action(){ remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 ); } function jas_claue_child_wc_page_head() { if ( ! cs_get_option( 'wc-enable-page-title' ) || ( class_exists( 'WCV_Vendors' ) && WCV_Vendors::is_vendor_page() ) ) return; $title = cs_get_option( 'wc-page-title' ); $output = '<div class="page-head pr tc"><div class="jas-container pr">'; if ( is_search() ) { $output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>'; } elseif ( is_shop() ) { $output .= '<h1 class="mb__5 cw">' . esc_html( cs_get_option( 'wc-page-title' ) ) . '</h1>'; $output .= '<p class="mg__0">' . do_shortcode( cs_get_option( 'wc-page-desc' ) ) . '</p>'; } else { // Remove old position of category description remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); $output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>'; //$output .= do_shortcode( category_description() ); add_action( 'woocommerce_after_shop_loop', 'woocommerce_taxonomy_archive_description', 40 ); add_action( 'woocommerce_after_shop_loop', 'woocommerce_product_archive_description', 40 ); } ob_start(); $output .= ob_get_clean(); $output .= '</div></div>'; echo wp_kses_post( $output ); } add_action( 'woocommerce_after_main_content', 'jas_claue_child_wc_page_head', 15 );
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio-
February 22, 2021 at 11:16 pm #40535
Yes, I will be extending the support from you guys! Would this be a permanent change of after an update I would have to re-enter it? Thanks in advance!
-
-
February 22, 2021 at 11:20 pm #40537
This apply on child theme and you don’t need to update, for any update we only change on parent theme.
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
February 23, 2021 at 1:08 am #40544
Awesome! Is there a way to add a small text at the top-left letting them know the category and then to the head-page we moved to the bottom to add a description to it? Thanks in advance.
-
February 23, 2021 at 8:50 am #40548
Thank you for renew your support.
Can you make a screenshot describe what you want. It now i still not clear
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio-
February 23, 2021 at 8:42 pm #40568
I want to optimize my pages and categories for SEO purposes. When I write description for them it is showing on the pages like this:
I thought if I put this section at the bottom visitors can also read it. But when I put this section on the bottom I see that description does not show up. How we can put this section on the bottom and able to show description with white background and since is there a way to add some sort of bread-crumbs or at least the name of the page in the top left corner of the page below the navigation menu? Thanks in advance.
-
-
February 23, 2021 at 11:11 pm #40574
Hi,
Please try change code to
/* move category description below products */ add_action( 'wp_head', 'remove_my_action' ); function remove_my_action(){ remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 ); } function jas_claue_child_wc_page_head() { if ( ! cs_get_option( 'wc-enable-page-title' ) || ( class_exists( 'WCV_Vendors' ) && WCV_Vendors::is_vendor_page() ) ) return; $title = cs_get_option( 'wc-page-title' ); $output = '<div class="page-head pr tc"><div class="jas-container pr">'; if ( is_search() ) { $output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>'; } elseif ( is_shop() ) { $output .= '<h1 class="mb__5 cw">' . esc_html( cs_get_option( 'wc-page-title' ) ) . '</h1>'; $output .= '<p class="mg__0">' . do_shortcode( cs_get_option( 'wc-page-desc' ) ) . '</p>'; } else { // Remove old position of category description remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); $output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>'; $output .= do_shortcode( category_description() ); } ob_start(); $output .= ob_get_clean(); $output .= '</div></div>'; echo wp_kses_post( $output ); } add_action( 'woocommerce_after_main_content', 'jas_claue_child_wc_page_head', 15 );
and add below code to claue-child > style.css
.term-description { display: block; }
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio-
February 23, 2021 at 11:28 pm #40575
Thank you for the quick response.
Here is how the site looks now:
Although the page-head is on the bottom, at the top it duplicates the description from the page head. I would like there to be the text of the actual category the person is viewing rather than the description that is showing at the top.
How do we go about solving this issue? Thanks in advance.
-
-
February 24, 2021 at 9:00 am #40576
Hi,
You mean category’s name on top and the description text of category on bottom?
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio-
February 24, 2021 at 11:17 am #40578
Yes and could we make the background of the page-head transparent aswell? Thanks in advance.
-
-
February 24, 2021 at 11:22 am #40579
Please change code to
/* move category description below products */ add_action( 'wp_head', 'remove_my_action' ); function remove_my_action(){ remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 ); } function jas_claue_child_wc_page_head() { if ( ! cs_get_option( 'wc-enable-page-title' ) || ( class_exists( 'WCV_Vendors' ) && WCV_Vendors::is_vendor_page() ) ) return; $title = cs_get_option( 'wc-page-title' ); $output = '<div class="page-head pr tc"><div class="jas-container pr">'; if ( is_search() ) { $output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>'; } elseif ( is_shop() ) { $output .= '<h1 class="mb__5 cw">' . esc_html( cs_get_option( 'wc-page-title' ) ) . '</h1>'; $output .= '<p class="mg__0">' . do_shortcode( cs_get_option( 'wc-page-desc' ) ) . '</p>'; } else { // Remove old position of category description remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); $output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>'; //$output .= do_shortcode( category_description() ); add_action( 'woocommerce_after_shop_loop', 'woocommerce_taxonomy_archive_description', 40 ); add_action( 'woocommerce_after_shop_loop', 'woocommerce_product_archive_description', 40 ); } ob_start(); $output .= ob_get_clean(); $output .= '</div></div>'; echo wp_kses_post( $output ); } add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );
and add below code to claue-child > style.css
.term-description { display: block; width: 100%; max-width: 1170px; margin: 30px auto; } .page-head { padding: 20px 0 10px; } .page-head h1 { color: #222; } .page-head::before { background: #f6f6f8; }
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio-
February 24, 2021 at 11:33 am #40580
Awesome, seems like everything in this regard is okay. Thank you for the help! If there is any issues I will let you know.
-
-
February 24, 2021 at 3:58 pm #40582
You’re welcome.
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio
-
-
AuthorPosts
You must be logged in to reply to this topic.