Home Forums Themes Support Claue product catagory content box

Topic Resolution: Resolved
Viewing 24 reply threads
  • Author
    Posts
    • #38572
      artimization
      Supported

      Greeting,

      I need to add content 500 words for each category page but the issue is all content showing on the header area. I need to show content box below the products, see attached link

      Screen shot

      https://drive.google.com/file/d/1HFYqMDxfzfiPWleIu4zDR46nUt0vJp96/view?usp=sharing

      category page url:

      https://www.lifestyle-collection.com.pk/product-category/watches/mens-watches/casio-edifice-mens/

      Regards

      omer

    • #38573
      Harry
      Supported

      Hi,

      Please add below code to claue-child > functions.php

      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;
      }

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38630
      artimization
      Supported

      Greetings,

      Above mention code is working perfectly fine, but the issue is all related product showing in grid style. i want same old carousel slider style for related products.

      Check video related product showing:
      https://drive.google.com/file/d/1s9MIX8dmFUDVz-SubT8fGDPsBkKHI8iF/view?usp=sharing

      Regard

      omer

    • #38755
      artimization
      Supported
      This reply has been marked as private.
    • #38761
      Harry
      Supported

      Hi,

      please change code to

      add_action( 'wp_head', 'remove_my_action' ); 
      function remove_my_action(){
      	remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 );
      }
      add_action( 'woocommerce_after_main_content', 'jas_claue_wc_page_head', 15 );

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38820
      artimization
      Supported

      Hello thanks for your reply.

      I want only H1 heading move below to the content box. so the top banner is no text, all content below the watch,

      I  want banner at the top & heading or content box bottom,

      check the video

      https://drive.google.com/file/d/13EjDJTfSQwSNPlO7AYxnBpUQwgC_h3iG/view

      Regards

      omer

       

    • #38821
      artimization
      Supported

      Hi, please change code to

      add_action( 'wp_head', 'remove_my_action' );
      function remove_my_action(){
      remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 );
      }
      add_action( 'woocommerce_after_main_content', 'jas_claue_wc_page_head', 15 );

      Kind regards

       

      This code is work but i want banner at the top.
      Code rendered  image
      https://drive.google.com/file/d/1erGh0suZXcS9jYsQSkvtExc-RVqlz9Tz/view?usp=sharinghttps://drive.google.com/drive/u/0/my-drive

      • This reply was modified 1 week, 5 days ago by artimization.
    • #38831
      Harry
      Supported

      Hi,

      Please change code to

      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() {
      	$output = '<div class="page-head pr tc"><div class="jas-container pr">';
      	$output .= '</div></div>';
      }
      add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );
      
      function jas_claue_child_wc_description() {
      	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="wc-description 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_description', 15 );

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38832
      artimization
      Supported

      Hi, Please change code to

      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() {
      	$output = '
      '; $output .= '
      '; } add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 ); function jas_claue_child_wc_description() { 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 = '
      '; 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 .= '
      '; echo wp_kses_post( $output ); } add_action( 'woocommerce_after_main_content', 'jas_claue_child_wc_description', 15 );

      Kind regards

       

      Still not fixed my issue please check the attached link
      Banner is gone, content box showing above the product,

      Wrong: https://drive.google.com/file/d/1fQ_uukb6TzJ9AMb-deguyQYw09GnCx__/view?usp=sharing

      I need this: https://drive.google.com/file/d/1nhwQJ2XPvg9vA-fTRLsbcnQfd12VZM2K/view?usp=sharing

      Live page: https://www.lifestyle-collection.com.pk/product-category/watches/mens-watches/casio-edifice-mens/

      I only want to move H1 heading to the content box below the products

      Regards

      omer

       

       

       

       

       

       

       

       

       

       

       

       

       

    • #38833
      artimization
      Supported

      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 = ‘

      ‘;
      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 .= ‘

      ‘;

      echo wp_kses_post( $output );
      }
      add_action( ‘woocommerce_before_main_content’,
      ‘jas_claue_child_wc_page_head’, 15 );

      Above code is working perfectly fine, Please add heading setting in the code.

      Thank you

      • This reply was modified 1 week, 4 days ago by artimization.
    • #38835
      artimization
      Supported

      Hi,

      Please add below code to claue-child > functions.php

      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 = '
      '; 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 .= '
      '; 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;
      }

      Kind regards

      Above code is working perfectly fine, Please add heading setting in the code.

      Thank you

    • #38836
      artimization
      Supported

      Above code is working perfectly fine, Please add heading setting in the code.

      Thank you

      Above code is working perfectly fine, Please add heading setting in the code.

      Thank you

    • #38840
      Harry
      Supported

      You’re welcome.

      Have a nice day!

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38847
      artimization
      Supported

      Thankyou but my heading issue is not done yet.

      Please check the video what i want,

      https://drive.google.com/file/d/1OcX4YKlcj-tyDNqBj3MvUNYGDpENnqjj/view

      Your support is much appreciated .

      Regards

      Haris

    • #38849
      Harry
      Supported

      Please change code to

      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() {
          remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
          $output = '<div class="page-head pr tc pt__20 pb__20"><div class="jas-container pr">';
          $output .= '<p class="mg__0"> &nbsp; </p>';
          $output .= '</div></div>';
          echo wp_kses_post( $output );
      }
      add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );
      
      function jas_claue_child_wc_description() {
          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="wc-description pr tc"><div class="jas-container pr">';
              if ( is_search() ) {
                  $output .= '<h1 class="mb__5 cd">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>';
              } elseif ( is_shop() ) {
                  $output .= '<h1 class="mb__5 cd">' . 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="cd">' . single_cat_title( '', false ) . '</h1>';
                  //$output .= do_shortcode( category_description() );
                  add_action( 'woocommerce_after_main_content', 'woocommerce_taxonomy_archive_description', 40 );
                  add_action( 'woocommerce_after_main_content', '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_description', 15 );

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38850
      artimization
      Supported

      Bingooo we are almost done, just position error please see the attached video.

      https://drive.google.com/file/d/1QQ-clYfCJzSGY1mq7Tg0OL2R-xjD5bs3/view

      Regards

      omer

    • #38851
      Harry
      Supported

      please change code to

      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() {
          remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
          $output = '<div class="page-head pr tc pt__20 pb__20"><div class="jas-container pr">';
          $output .= '<p class="mg__0"> &nbsp; </p>';
          $output .= '</div></div>';
          echo wp_kses_post( $output );
      }
      add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );
      
      function jas_claue_child_wc_description() {
          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="wc-description pr tc"><div class="jas-container pr">';
              if ( is_search() ) {
                  $output .= '<h1 class="mb__5 cd">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>';
              } elseif ( is_shop() ) {
                  $output .= '<h1 class="mb__5 cd">' . 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="cd">' . 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_shop_loop', 'jas_claue_child_wc_description', 40 );

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38852
      artimization
      Supported

      99% done. box is align perfectly just content box is hide, Please check the video:

      https://drive.google.com/file/d/1w-aQzkOM8wYXg_Ot_KaskgPlsCb9Q-as/view

      Regards

      omer

    • #38853
      Harry
      Supported

      Please change code to

      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() {
          remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
          $output = '<div class="page-head pr tc pt__20 pb__20"><div class="jas-container pr">';
          $output .= '<p class="mg__0"> &nbsp; </p>';
          $output .= '</div></div>';
          echo wp_kses_post( $output );
      }
      add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );
      
      function jas_claue_child_wc_description() {
          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="wc-description pr tc"><div class="jas-container pr">';
              if ( is_search() ) {
                  $output .= '<h1 class="mb__5 cd">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>';
              } elseif ( is_shop() ) {
                  $output .= '<h1 class="mb__5 cd">' . 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="cd">' . 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_shop_loop', 'jas_claue_child_wc_description', 40 );

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38854
      artimization
      Supported

      Bingooo Superb Now code is working perfectly.

      Thank you so much for your support.

      Regards

      Omer

       

    • #38869
      cata78
      Supported

      Hi,

      I put the code below on functions.php and works good.

      This code removed completely the h1 title and description from header and moved it on footer. Now i want to put another h1 title back on it’s place, but i want to be custom this time. I want to modify manually each h1 from header and give a different name, not the page name.

      Also i want to have the option to modify meta title and meta description on each category/subcategory.

      Thanks in advance!

      Please change code to

      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() {
          remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
          $output = '
      '; $output .= '<p class="mg__0"> &nbsp; </p>'; $output .= '
      '; echo wp_kses_post( $output ); } add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 ); function jas_claue_child_wc_description() { 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 = '
      '; if ( is_search() ) { $output .= '<h1 class="mb__5 cd">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>'; } elseif ( is_shop() ) { $output .= '<h1 class="mb__5 cd">' . 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="cd">' . 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 .= '
      '; echo wp_kses_post( $output ); } add_action( 'woocommerce_after_shop_loop', 'jas_claue_child_wc_description', 40 );

       

      • #38872
        Harry
        Supported

        Hi @cata78,

        1. Please change code to move h1 on top.

        /* 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 );

        2. The h1 is now category title

        3. I recommend use plugin Rank Math https://wordpress.org/plugins/seo-by-rank-math/

        Kind regards

        Harry
        Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38873
      cata78
      Supported

      I changed the code with the one you give me and text disappeared from the footer and h1 moved back to header, which is the same this as i didn’t put any code.

      • #38874
        Harry
        Supported

        Please add below code to claue-child > style.css

        .term-description {
        	display: block;
        	width: 100%;
        	max-width: 1170px;
        	margin: 30px auto;
        }

        Kind regards

        Harry
        Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38877
      cata78
      Supported

      The code was already there. Still nothing happen.

      The description from footer disapeared completely.

    • #38881
      Harry
      Supported

      I check on my side the h1 on background head and the description text of category on footer. https://prnt.sc/v0j15j https://prnt.sc/v0j1fh

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #38882
      cata78
      Supported

      Was a caching problem and i cleared the cookies. The code works perfectly.

Viewing 24 reply threads

You must be logged in to reply to this topic.