Home Forums Themes Support Claue deactivate entry date on pages not blog posts

Viewing 14 reply threads
  • Author
    Posts
    • #29408

      Hi,

      on my site https://happinesbox.eu I often have the entry date published below the page or item title. This is fine for blog posts but not on other pages or items, such as portfolio items.
      How can I remove this but still keep it on blog posts?

      Kind regards,
      Tony

    • #29415

      Hi Tony,

      Please add below code

      .portfolio-template-default .entry-date {display: none;}

      Could you please renew your support at https://themeforest.net/item/claue-clean-minimal-woocommerce-theme/18929281

      Thanks

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

    • #29417

      Hi Harry,

      thanks for your reply.
      I already renewed my support, right before sending you my question of this morning.

      Kind regards,
      Tony

    • #29418

      Harry,

      another question : how can I add some text block on the shop pages per category below the list of products? When I edit the page ‘shop’ then all I add is added above the list of products.

      Kind regards,
      Tony

    • #29419

      Hi Tony,

      Thank for renew support.

      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', 100 );
      		}
      		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 remove section you add by page builder on shop page and add below code to Claue > Theme Option > General Layout > Custom CSS

      .term-description {
      	display: block;
      	margin-top: 30px;
      }

      Kind regards

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

    • #29422

      Hi Harry,

      I believe this will remove my category description from the top and put it below the products, right?
      Is there a way to keep the category description right where it is and add a new section below the products?

      Kind regards,
      Tony

    • #29423

      Hi Tony,

      If you want add to all category page. You need create new widget area but the text will same for all categories.

      If you want i will give you code.

      Kind regards

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

    • #29426

      Hi Harry,

      is there a way to create a completely new text area to a category? Make a category have a title, description (by default) and an extra text area. Where the title and description are on top and the extra text area is below the products on the category shop page.

      Kind regards,
      Tony

    • #29428

      Yes, it can keep title and description on top and the extra text are is below product on the category but the text will same on all categories page.

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

    • #29430

      Harry,

      that’s not what I want. I need a text area that’s different for each category.
      Is there a way to add such an extra text area to the default fields that define a category? A category now has a number of fields like ‘title’, ‘slug’, ‘description’,… Can we add one that’s ‘text’?

      Kind regards,
      Tony

    • #29431

      Hi Tony,

      1. Please install this plugin https://en-gb.wordpress.org/plugins/advanced-custom-fields/

      2. Go to Custom Fields > Add new field name “woocommerce_product_category_page_bottom_description” like this screenshot http://prntscr.com/mt24g1 and rule http://prntscr.com/mt25uf

      3. Add below code to claue-child > functions.php

      function action_woocommerce_after_shop_loop() {	 
      	$term_id = get_queried_object()->term_id;
      	$post_id = 'product_cat_'.$term_id;
      	$custom_field = get_field('woocommerce_product_category_page_bottom_description', $post_id); // My Advanced Custom Field Variable	 
      	echo '<div class="extra_text">' . $custom_field . '</div>';
       
      }; 
      add_action( 'woocommerce_after_shop_loop', 'action_woocommerce_after_shop_loop', 100);

      4. Add below code to Claue > Theme Option > general layout > custom CSS

      .extra_text {
      	margin-top: 30px;
      }

      Kind regards

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

    • #29435

      Hi Harry,

      worked very well, thank you.
      How would I achieve the same on the general shop page?

      Kind regards,
      Tony

    • #29444

      Hi Tony,

      I’m sorry it doesn’t for main shop page.

      Kind regards

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

    • #29447

      Hi Harry,

      is there any other solution to accomplish the same for the main shop page?
      Should I create a new main shop page? And use the Woocommerce standard shortcode [products] to display all the products?

      Kind regards,
      Tony

    • #29448

      Hi Tony,

      1. I’m sorry, this need more advance PHP skill, please contact experts at https://bit.ly/2Loo6ke

      2. You don’t need create page, please remove all short code “products” on shop page just go to WooCommerce > Settings > Products > Shop Page > Choose “Shop Page”

      Kind regards

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

Viewing 14 reply threads

You must be logged in to reply to this topic.