Home Forums Themes Support Claue SEO text at the bottom of the page

Topic Resolution: Resolved
Viewing 12 reply threads
  • Author
    Posts
    • #39727
      DonnaJacky
      Supported

      Dear Harry,

      How are you?
      We would like to have the SEO text at the bottom of te page, just like the following URL has: https://www.littlewonderland.nl/nl/producten/

      We have tried it with a code in the php.functions, but it isn’t working (add_action( ‘woocommerce_archive_description’, ‘woocommerce_taxonomy_archive_description’, 10 );).

      Do you have a solution for us, so that we can add text at the bottom of te category pages?

      Thanks!

    • #39730
      Harry
      Supported

      Hi Donna,

      Please 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_before_main_content', 'jas_claue_child_wc_page_head', 15 );

      and 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

    • #39733
      DonnaJacky
      Supported

      Thank you! I did.
      But where can I add my text? If I add it in ”description” at category’s, I don’t see it at the pages.

    • #39736
      Harry
      Supported

      I help you corrected the code, now please add text and check again.

      Kind regards

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

    • #39738
      DonnaJacky
      Supported

      Hi Harry,

      Thank you! I just add the text ”Test”, but still cannot see it, for example: https://www.koreosity.nl/product-categorie/gezicht/cleansers/

      Where do I need to add the text? Description in category, right?

    • #39739
      Harry
      Supported

      I see the text.

      Please add long texts to category description.

      You will see the text.

      Kind regards

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

    • #39740
      DonnaJacky
      Supported

      Yes, thank you!!

    • #40297
      DonnaJacky
      Supported

      Dear Harry,

      We want it both sides, above the page and at the bottom of the page.
      The code is working, but now we cannot add text above the page, like it was.

    • #40300
      Harry
      Supported

      Hi Jacky,

      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
      			$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 );

      Kind regards

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

    • #40527
      sjlabar
      Supported

      Hello,

       

      I am trying to display category description below product listings, but failed, followed the above mentioned method, but it doesn’t work for me.

      • #40529
        Harry
        Supported

        Can you send me your site url and login credentials to check?

        Thanks

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

    • #40530
      sjlabar
      Supported
      This reply has been marked as private.
      • #40531
        Harry
        Supported
        This reply has been marked as private.

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

      • #40566
        sjlabar
        Supported
    • #40552
      sjlabar
      Supported

      I need to display the category description at the bottom.  Also the block width is exceeding…

    • #40581
      sjlabar
      Supported

      already using this code, but the description if sowing above the products https://selection.pk/product-category/lawn/

Viewing 12 reply threads

You must be logged in to reply to this topic.