Home Forums Basel support forum Shop categories menu on other pages

Shop categories menu on other pages

Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #7703

    alan12341234
    Participant

    I want to have the “Category” list horizontally like http://demo.xtemos.com/basel/shop/

    but I want to display it on the home (and every page). Please let me know how to do it, I found an option in “Theme settings -> Shop -> Shop page layout” but this seems only affect the shop page.

    I have the AJAX Shop disabled. Please let me know how to submit the creditals to you, or you can send me a child theme.

    #7705

    Artem Temos
    Keymaster

    Hello,

    Thank you so much for contacting our support center.

    We have moved your reply to the separate thread. Please send your FTP and admin access using “Private content” field. Child theme you can download from themeforest together with parent theme.

    Kind Regards
    XTemos Studio

    #7779

    alan12341234
    Participant

    Please find the FTP and admin access in “Private content”

    #7784

    Artem Temos
    Keymaster

    OK, please check now. We made our changes in the child theme only.

    #7790

    am123
    Participant

    OK. I need it too. Categories menu on every page except – start page 🙂

    #7792

    alan12341234
    Participant

    PERFECT! Thank you very much.

    #7794

    Artem Temos
    Keymaster

    Great, we are glad to help you.


    @am123
    , try to place the following code to the functions.php file in your child theme 🙂

    
    add_action( 'basel_after_header', 'basel_page_title', 10 );
    
    function basel_page_title() {
        global $wp_query, $post;
    
        // Remove page title for dokan store list page
    
        if( function_exists( 'dokan_is_store_page' )  && dokan_is_store_page() ) {
        	return '';
        }
    
    	$page_id = 0;
    
    	$disable     = false;
    	$page_title  = true;
    	$breadcrumbs = basel_get_opt( 'breadcrumbs' );
    
    	$image = '';
    
    	$style = '';
    
    	$page_for_posts    = get_option( 'page_for_posts' );
    	$page_for_shop     = get_option( 'woocommerce_shop_page_id' );
    	$page_for_projects = basel_tpl2id( 'portfolio.php' );
    
    	$title_class = 'page-title-';
    
    	$title_color = $title_type = $title_size = 'default';
    
    	// Get default styles from Options Panel
    	$title_design = basel_get_opt( 'page-title-design' );
    
    	$title_size = basel_get_opt( 'page-title-size' );
    
    	$title_color = basel_get_opt( 'page-title-color' );
    
    	$shop_title = basel_get_opt( 'shop_title' );
    	$shop_categories = basel_get_opt( 'shop_categories' );
    
    	// Set here page ID. Will be used to get custom value from metabox of specific PAGE | BLOG PAGE | SHOP PAGE.
    	$page_id = basel_page_ID();
    
    	if( $page_id != 0 ) {
    		// Get meta value for specific page id
    		$disable = get_post_meta( $page_id, '_basel_title_off', true );
    
    		$image = get_post_meta( $page_id, '_basel_title_image', true );
    
    		$custom_title_color = get_post_meta( $page_id, '_basel_title_color', true );
    		$custom_title_bg_color = get_post_meta( $page_id, '_basel_title_bg_color', true );
    
    		if( $image != '' ) {
    			$style .= "background-image: url(" . $image . ");";
    		}
    
    		if( $custom_title_bg_color != '' ) {
    			$style .= "background-color: " . $custom_title_bg_color . ";";
    		}
    
    		if( $custom_title_color != '' && $custom_title_color != 'default' ) {
    			$title_color = $custom_title_color;
    		}
    	}
    
    	if( $title_design == 'disable' ) $page_title = false;
    
    	if( ! $page_title && ! $breadcrumbs ) $disable = true;
    
    	#if( $disable && ! is_home() ) return;
    
    	$title_class .= $title_type;
    	$title_class .= ' title-size-'  . $title_size;
    	$title_class .= ' color-scheme-' . $title_color;
    	$title_class .= ' title-design-' . $title_design;
    
    	// Heading for pages
    	if( is_singular( 'page' ) && ( ! $page_for_posts || ! is_page( $page_for_posts ) )  ):
    		$title = get_the_title();
    
    		?>
    			<div class="page-title <?php echo esc_attr( $title_class ); ?>" style="<?php echo esc_attr( $style ); ?>">
    				<div class="container">
    					<header class="entry-header">
    						<?php if( $page_title ): ?><h1 class="entry-title"><?php echo esc_html( $title ); ?></h1><?php endif; ?>
    						<?php if( $breadcrumbs ) basel_breadcrumbs(); ?>
    					</header><!-- .entry-header -->
    				</div>
    			</div>
    		<?php
    	endif;
    
    	// Heading for blog and archives
    	if( is_home() || is_singular( 'post' ) || is_search() || is_tag() || is_category() || is_date() || is_author() ):
    
    		$title = ( ! empty( $page_for_posts ) ) ? get_the_title( $page_for_posts ) : esc_html__( 'Blog', 'basel' );
    
    		if( is_tag() ) {
    			$title = esc_html__( 'Tag Archives: ', 'basel')  . single_tag_title( '', false ) ;
    		}
    
    		if( is_category() ) {
    			$title = '<span>' . single_cat_title( '', false ) . '</span>'; //esc_html__( 'Category Archives: ', 'basel') . 
    		}
    
    		if( is_date() ) {
    			if ( is_day() ) :
    				$title = esc_html__( 'Daily Archives: ', 'basel') . get_the_date();
    			elseif ( is_month() ) :
    				$title = esc_html__( 'Monthly Archives: ', 'basel') . get_the_date( _x( 'F Y', 'monthly archives date format', 'basel' ) );
    			elseif ( is_year() ) :
    				$title = esc_html__( 'Yearly Archives: ', 'basel') . get_the_date( _x( 'Y', 'yearly archives date format', 'basel' ) );
    			else :
    				$title = esc_html__( 'Archives', 'basel' );
    			endif;
    		}
    
    		if ( is_author() ) {
    			/*
    			 * Queue the first post, that way we know what author
    			 * we're dealing with (if that is the case).
    			 *
    			 * We reset this later so we can run the loop
    			 * properly with a call to rewind_posts().
    			 */
    			the_post();
    
    			$title = esc_html__( 'Posts by ', 'basel' ) . '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>';
    
    			/*
    			 * Since we called the_post() above, we need to
    			 * rewind the loop back to the beginning that way
    			 * we can run the loop properly, in full.
    			 */
    			rewind_posts();
    		}
    
    		if( is_search() ) {
    			$title = esc_html__( 'Search Results for: ', 'basel' ) . get_search_query();
    		}
    
    		?>
    			<div class="page-title <?php echo esc_attr( $title_class ); ?> title-blog" style="<?php echo esc_attr( $style ); ?>">
    				<div class="container">
    					<header class="entry-header">
    						<?php if( $page_title ): ?><h1 class="entry-title"><?php echo  $title; ?></h1><?php endif; ?>
    						<?php if( $breadcrumbs ) basel_breadcrumbs(); ?>
    					</header><!-- .entry-header -->
    				</div>
    			</div>
    		<?php
    	endif;
    
    	// Heading for portfolio
    	if( is_post_type_archive( 'portfolio' ) || is_singular( 'portfolio' ) || is_tax( 'project-cat' ) ):
    
    		$title = get_the_title( $page_for_projects );
    
    		if( is_tax( 'project-cat' ) ) {
    			$title = single_term_title( '', false );
    		}
    
    		?>
    			<div class="page-title <?php echo esc_attr( $title_class ); ?> title-blog" style="<?php echo esc_attr( $style ); ?>">
    				<div class="container">
    					<header class="entry-header">
    						<?php if( $page_title ): ?><h1 class="entry-title"><?php echo esc_html( $title ); ?></h1><?php endif; ?>
    						<?php if( $breadcrumbs ) basel_breadcrumbs(); ?>
    					</header><!-- .entry-header -->
    				</div>
    			</div>
    		<?php
    		return;
    	endif;
    
    	// Page heading for shop page
    	if( basel_woocommerce_installed()):
    
    		if( is_product_category() ) {
    
    	        $cat = $wp_query->get_queried_object();
    
    			$cat_image = basel_get_category_page_title_image( $cat );
    
    			if( $cat_image != '') {
    				$style = "background-image: url(" . $cat_image . ")";
    			}
    		}
    
    		if( ! $shop_title ) {
    			$title_class .= ' without-title';
    		}
    
    		?>
    			<?php if ( apply_filters( 'woocommerce_show_page_title', true ) && ! is_singular( "product" ) ) : ?>
    				<div class="page-title <?php echo esc_attr( $title_class ); ?> title-shop" style="<?php echo esc_attr( $style ); ?>">
    					<div class="container">
    						<div class="nav-shop">
    							
    							<?php if ( is_product_category() || is_product_tag() ): ?>
    								<?php basel_back_btn(); ?>
    							<?php endif ?>
    
    							<?php if ( $shop_title ): ?>
    								<h1><?php woocommerce_page_title(); ?></h1>
    							<?php endif ?>
    							
    							<?php if( ! is_singular( "product" ) && $shop_categories ) basel_product_categories_nav(); ?>
    
    						</div>
    					</div>
    				</div>
    			<?php endif; ?>
    
    		<?php
    		
    		return;
    	endif;
    }
    #7795

    am123
    Participant

    Almost ok. Doesn’t work on Product Page. And there I need it 🙂

    #7796

    Artem Temos
    Keymaster

    Try to replace this line

    <?php if ( apply_filters( 'woocommerce_show_page_title', true ) && ! is_singular( "product" ) ) : ?>

    with this one

    <?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>

    Regards

    #23459

    sandervdb
    Participant

    Hi There,

    I would like to have the same, but a little bit different.
    What i would like if the shope category menu (horizontal) would only show on the home/start page and the default pages it shows now.

    How would i accomplish that ?
    Great theme !!!

    #23477

    Artem Temos
    Keymaster

    Hello,

    Try to add the following code snippet to the functions.php file in the child theme

    add_action( 'basel_after_header', 'basel_page_title', 10 );
    
    function basel_page_title() {
        global $wp_query, $post;
    
        // Remove page title for dokan store list page
    
        if( function_exists( 'dokan_is_store_page' )  && dokan_is_store_page() ) {
        	return '';
        }
    
    	$page_id = 0;
    
    	$disable     = false;
    	$page_title  = true;
    	$breadcrumbs = basel_get_opt( 'breadcrumbs' );
    
    	$image = '';
    
    	$style = '';
    
    	$page_for_posts    = get_option( 'page_for_posts' );
    	$page_for_shop     = get_option( 'woocommerce_shop_page_id' );
    	$page_for_projects = basel_tpl2id( 'portfolio.php' );
    
    	$title_class = 'page-title-';
    
    	$title_color = $title_type = $title_size = 'default';
    
    	// Get default styles from Options Panel
    	$title_design = basel_get_opt( 'page-title-design' );
    
    	$title_size = basel_get_opt( 'page-title-size' );
    
    	$title_color = basel_get_opt( 'page-title-color' );
    
    	$shop_title = basel_get_opt( 'shop_title' );
    	$shop_categories = basel_get_opt( 'shop_categories' );
    
    	// Set here page ID. Will be used to get custom value from metabox of specific PAGE | BLOG PAGE | SHOP PAGE.
    	$page_id = basel_page_ID();
    
    	if( $page_id != 0 ) {
    		// Get meta value for specific page id
    		$disable = get_post_meta( $page_id, '_basel_title_off', true );
    
    		$image = get_post_meta( $page_id, '_basel_title_image', true );
    
    		$custom_title_color = get_post_meta( $page_id, '_basel_title_color', true );
    		$custom_title_bg_color = get_post_meta( $page_id, '_basel_title_bg_color', true );
    
    		if( $image != '' ) {
    			$style .= "background-image: url(" . $image . ");";
    		}
    
    		if( $custom_title_bg_color != '' ) {
    			$style .= "background-color: " . $custom_title_bg_color . ";";
    		}
    
    		if( $custom_title_color != '' && $custom_title_color != 'default' ) {
    			$title_color = $custom_title_color;
    		}
    	}
    
    	if( $title_design == 'disable' ) $page_title = false;
    
    	if( ! $page_title && ! $breadcrumbs ) $disable = true;
    
    	if( $disable && ! is_front_page() ) return;
    
    	$title_class .= $title_type;
    	$title_class .= ' title-size-'  . $title_size;
    	$title_class .= ' color-scheme-' . $title_color;
    	$title_class .= ' title-design-' . $title_design;
    
    	// Heading for pages
    	if( is_singular( 'page' ) && ( ! $page_for_posts || ! is_page( $page_for_posts ) ) ):
    		$title = get_the_title();
    
    		?>
    			<div class="page-title <?php echo esc_attr( $title_class ); ?>" style="<?php echo esc_attr( $style ); ?>">
    				<div class="container">
    					<header class="entry-header">
    						<?php if( $page_title ): ?><h1 class="entry-title"><?php echo esc_html( $title ); ?></h1><?php endif; ?>
    						<?php if( $breadcrumbs ) basel_breadcrumbs(); ?>
    					</header><!-- .entry-header -->
    				</div>
    			</div>
    		<?php
    		return;
    	endif;
    
    	// Heading for blog and archives
    	if( is_home() || is_singular( 'post' ) || is_search() || is_tag() || is_category() || is_date() || is_author() ):
    
    		$title = ( ! empty( $page_for_posts ) ) ? get_the_title( $page_for_posts ) : esc_html__( 'Blog', 'basel' );
    
    		if( is_tag() ) {
    			$title = esc_html__( 'Tag Archives: ', 'basel')  . single_tag_title( '', false ) ;
    		}
    
    		if( is_category() ) {
    			$title = '<span>' . single_cat_title( '', false ) . '</span>'; //esc_html__( 'Category Archives: ', 'basel') . 
    		}
    
    		if( is_date() ) {
    			if ( is_day() ) :
    				$title = esc_html__( 'Daily Archives: ', 'basel') . get_the_date();
    			elseif ( is_month() ) :
    				$title = esc_html__( 'Monthly Archives: ', 'basel') . get_the_date( _x( 'F Y', 'monthly archives date format', 'basel' ) );
    			elseif ( is_year() ) :
    				$title = esc_html__( 'Yearly Archives: ', 'basel') . get_the_date( _x( 'Y', 'yearly archives date format', 'basel' ) );
    			else :
    				$title = esc_html__( 'Archives', 'basel' );
    			endif;
    		}
    
    		if ( is_author() ) {
    			/*
    			 * Queue the first post, that way we know what author
    			 * we're dealing with (if that is the case).
    			 *
    			 * We reset this later so we can run the loop
    			 * properly with a call to rewind_posts().
    			 */
    			the_post();
    
    			$title = esc_html__( 'Posts by ', 'basel' ) . '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>';
    
    			/*
    			 * Since we called the_post() above, we need to
    			 * rewind the loop back to the beginning that way
    			 * we can run the loop properly, in full.
    			 */
    			rewind_posts();
    		}
    
    		if( is_search() ) {
    			$title = esc_html__( 'Search Results for: ', 'basel' ) . get_search_query();
    		}
    
    		?>
    			<div class="page-title <?php echo esc_attr( $title_class ); ?> title-blog" style="<?php echo esc_attr( $style ); ?>">
    				<div class="container">
    					<header class="entry-header">
    						<?php if( $page_title ): ?><h1 class="entry-title"><?php echo  $title; ?></h1><?php endif; ?>
    						<?php if( $breadcrumbs ) basel_breadcrumbs(); ?>
    					</header><!-- .entry-header -->
    				</div>
    			</div>
    		<?php
    		return;
    	endif;
    
    	// Heading for portfolio
    	if( is_post_type_archive( 'portfolio' ) || is_singular( 'portfolio' ) || is_tax( 'project-cat' ) ):
    
    		$title = get_the_title( $page_for_projects );
    
    		if( is_tax( 'project-cat' ) ) {
    			$title = single_term_title( '', false );
    		}
    
    		?>
    			<div class="page-title <?php echo esc_attr( $title_class ); ?> title-blog" style="<?php echo esc_attr( $style ); ?>">
    				<div class="container">
    					<header class="entry-header">
    						<?php if( $page_title ): ?><h1 class="entry-title"><?php echo esc_html( $title ); ?></h1><?php endif; ?>
    						<?php if( $breadcrumbs ) basel_breadcrumbs(); ?>
    					</header><!-- .entry-header -->
    				</div>
    			</div>
    		<?php
    		return;
    	endif;
    
    	// Page heading for shop page
    	if( basel_woocommerce_installed() && ( is_front_page() || is_shop() || is_product_category() || is_product_tag() || is_singular( "product" ) || basel_is_product_attribute_archieve() )
    		&& ( $shop_categories || $shop_title )
    	 ):
    
    		if( is_product_category() ) {
    
    	        $cat = $wp_query->get_queried_object();
    
    			$cat_image = basel_get_category_page_title_image( $cat );
    
    			if( $cat_image != '') {
    				$style = "background-image: url(" . $cat_image . ")";
    			}
    		}
    
    		if( ! $shop_title ) {
    			$title_class .= ' without-title';
    		}
    
    		?>
    			<?php if ( apply_filters( 'woocommerce_show_page_title', true ) && ! is_singular( "product" ) ) : ?>
    				<div class="page-title <?php echo esc_attr( $title_class ); ?> title-shop" style="<?php echo esc_attr( $style ); ?>">
    					<div class="container">
    						<div class="nav-shop">
    							
    							<?php if ( is_product_category() || is_product_tag() ): ?>
    								<?php basel_back_btn(); ?>
    							<?php endif ?>
    
    							<?php if ( $shop_title ): ?>
    								<h1><?php woocommerce_page_title(); ?></h1>
    							<?php endif ?>
    							
    							<?php if( ! is_singular( "product" ) && $shop_categories ) basel_product_categories_nav(); ?>
    
    						</div>
    					</div>
    				</div>
    			<?php endif; ?>
    
    		<?php
    		
    		return;
    	endif;
    }

    Regards

    #23525

    sandervdb
    Participant

    Thank you for the info, but i cant get it to work.
    I attached a login on the CMS.

    Child theme is applied and functions.php is changed.
    Do i have to do something different or activate something else ?

    Hope to hear from you soon.

    #23531

    Artem Temos
    Keymaster

    Please, provide us your FTP access so we can check it.

    #23532

    sandervdb
    Participant

    Here the information you requested

    #23534

    Artem Temos
    Keymaster

    We thought you are writing about our Basel theme. Try this code instead

    	function woodmart_page_title() {
            global $wp_query, $post;
    
            // Remove page title for dokan store list page
    
            if( function_exists( 'dokan_is_store_page' )  && dokan_is_store_page() ) {
            	return '';
            }
    
    		$page_id = 0;
    
    		$disable     = false;
    		$page_title  = true;
    		$breadcrumbs = woodmart_get_opt( 'breadcrumbs' );
    
    		$image = '';
    
    		$style = '';
    
    		$page_for_posts    = get_option( 'page_for_posts' );
    		$page_for_shop     = get_option( 'woocommerce_shop_page_id' );
    		$page_for_projects = woodmart_tpl2id( 'portfolio.php' );
    
    		$title_class = 'page-title-';
    
    		$title_color = $title_type = $title_size = 'default';
    
    		// Get default styles from Options Panel
    		$title_design = woodmart_get_opt( 'page-title-design' );
    
    		$title_size = woodmart_get_opt( 'page-title-size' );
    
    		$title_color = woodmart_get_opt( 'page-title-color' );
    
    		$shop_title = woodmart_get_opt( 'shop_title' );
    		$shop_categories = woodmart_get_opt( 'shop_categories' );
    
    		// Set here page ID. Will be used to get custom value from metabox of specific PAGE | BLOG PAGE | SHOP PAGE.
    		$page_id = woodmart_page_ID();
    
    		if( $page_id != 0 ) {
    			// Get meta value for specific page id
    			$disable = get_post_meta( $page_id, '_woodmart_title_off', true );
    
    			$image = get_post_meta( $page_id, '_woodmart_title_image', true );
    
    			$custom_title_color = get_post_meta( $page_id, '_woodmart_title_color', true );
    			$custom_title_bg_color = get_post_meta( $page_id, '_woodmart_title_bg_color', true );
    
    			if( $image != '' ) {
    				$style .= "background-image: url(" . $image . ");";
    			}
    
    			if( $custom_title_bg_color != '' ) {
    				$style .= "background-color: " . $custom_title_bg_color . ";";
    			}
    
    			if( $custom_title_color != '' && $custom_title_color != 'default' ) {
    				$title_color = $custom_title_color;
    			}
    		}
    
    		if( $title_design == 'disable' ) $page_title = false;
    
    		if( ! $page_title && ! $breadcrumbs ) $disable = true;
    
    		if( $disable && ! is_front_page() ) return;
    
    		$title_class .= $title_type;
    		$title_class .= ' title-size-'  . $title_size;
    		$title_class .= ' color-scheme-' . $title_color;
    		$title_class .= ' title-design-' . $title_design;
    
    		// Heading for pages
    		if( is_singular( 'page' ) && !is_front_page() && ( ! $page_for_posts || ! is_page( $page_for_posts ) ) ):
    			$title = get_the_title();
    
    			?>
    				<div class="page-title <?php echo esc_attr( $title_class ); ?>" style="<?php echo esc_attr( $style ); ?>">
    					<div class="container">
    						<header class="entry-header">
    							<?php if ( woodmart_woocommerce_installed() && ( is_cart() || is_checkout() ) ): ?>
    								<?php woodmart_checkout_steps(); ?>
    							<?php else: ?>
    								<?php if( $page_title ): ?><h1 class="entry-title"><?php echo esc_html( $title ); ?></h1><?php endif; ?>
    								<?php if( $breadcrumbs ) woodmart_breadcrumbs(); ?>
    							<?php endif ?>
    						</header><!-- .entry-header -->
    					</div>
    				</div>
    			<?php
    			return;
    		endif;
    
    		// Heading for blog and archives
    		if( is_singular( 'post' ) || woodmart_is_blog_archive() ):
    
    			$title = ( ! empty( $page_for_posts ) ) ? get_the_title( $page_for_posts ) : esc_html__( 'Blog', 'woodmart' );
    
    			if( is_tag() ) {
    				$title = esc_html__( 'Tag Archives: ', 'woodmart')  . single_tag_title( '', false ) ;
    			}
    
    			if( is_category() ) {
    				$title = '<span>' . single_cat_title( '', false ) . '</span>'; 
    			}
    
    			if( is_date() ) {
    				if ( is_day() ) :
    					$title = esc_html__( 'Daily Archives: ', 'woodmart') . get_the_date();
    				elseif ( is_month() ) :
    					$title = esc_html__( 'Monthly Archives: ', 'woodmart') . get_the_date( _x( 'F Y', 'monthly archives date format', 'woodmart' ) );
    				elseif ( is_year() ) :
    					$title = esc_html__( 'Yearly Archives: ', 'woodmart') . get_the_date( _x( 'Y', 'yearly archives date format', 'woodmart' ) );
    				else :
    					$title = esc_html__( 'Archives', 'woodmart' );
    				endif;
    			}
    
    			if ( is_author() ) {
    				/*
    				 * Queue the first post, that way we know what author
    				 * we're dealing with (if that is the case).
    				 *
    				 * We reset this later so we can run the loop
    				 * properly with a call to rewind_posts().
    				 */
    				the_post();
    
    				$title = esc_html__( 'Posts by ', 'woodmart' ) . '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>';
    
    				/*
    				 * Since we called the_post() above, we need to
    				 * rewind the loop back to the beginning that way
    				 * we can run the loop properly, in full.
    				 */
    				rewind_posts();
    			}
    
    			if( is_search() ) {
    				$title = esc_html__( 'Search Results for: ', 'woodmart' ) . get_search_query();
    			}
    
    			?>
    				<div class="page-title <?php echo esc_attr( $title_class ); ?> title-blog" style="<?php echo esc_attr( $style ); ?>">
    					<div class="container">
    						<header class="entry-header">
    							<?php if( $page_title ): ?><h1 class="entry-title"><?php echo ( $title ); ?></h1><?php endif; ?>
    							<?php if( $breadcrumbs && !is_search() ) woodmart_breadcrumbs(); ?>
    						</header><!-- .entry-header -->
    					</div>
    				</div>
    			<?php
    			return;
    		endif;
    
    		// Heading for portfolio
    		if( is_singular( 'portfolio' ) || woodmart_is_portfolio_archive() ):
    
    			$title = get_the_title( $page_for_projects );
    
    			if( is_tax( 'project-cat' ) ) {
    				$title = single_term_title( '', false );
    			}
    
    			?>
    				<div class="page-title <?php echo esc_attr( $title_class ); ?> title-blog" style="<?php echo esc_attr( $style ); ?>">
    					<div class="container">
    						<header class="entry-header">
    							<?php if( $page_title ): ?><h1 class="entry-title"><?php echo esc_html( $title ); ?></h1><?php endif; ?>
    							<?php if( $breadcrumbs ) woodmart_breadcrumbs(); ?>
    						</header><!-- .entry-header -->
    					</div>
    				</div>
    			<?php
    			return;
    		endif;
    
    		// Page heading for shop page
    		if( is_front_page() || woodmart_is_shop_archive() && ( $shop_categories || $shop_title ) ):
    
    			if( is_product_category() ) {
    
    		        $cat = $wp_query->get_queried_object();
    
    				$cat_image = woodmart_get_category_page_title_image( $cat );
    
    				if( $cat_image != '') {
    					$style = "background-image: url(" . $cat_image . ")";
    				}
    			}
    
    			if( is_product_category() || is_product_tag() ) {
    				$title_class .= ' with-back-btn';
    			}
    
    			if( ! $shop_title ) {
    				$title_class .= ' without-title';
    			}
    
    			?>
    				<?php if ( apply_filters( 'woocommerce_show_page_title', true ) && ! is_singular( "product" ) ) : ?>
    					<div class="page-title <?php echo esc_attr( $title_class ); ?> title-shop" style="<?php echo esc_attr( $style ); ?>">
    						<div class="container">
    							<div class="nav-shop">
    
    								<div class="shop-title-wrapper">
    									<?php if ( is_product_category() || is_product_tag() ): ?>
    										<?php woodmart_back_btn(); ?>
    									<?php endif ?>
    
    									<?php if ( $shop_title && !is_front_page() ): ?>
    										<h1><?php woocommerce_page_title(); ?></h1>
    									<?php endif ?>
    
    									<?php if ( !woodmart_is_shop_archive() && get_the_title() ): ?>
    										<h1><?php echo get_the_title(); ?></h1>
    									<?php endif ?>
    								</div>
    								
    								<?php if( ! is_singular( "product" ) && $shop_categories ) woodmart_product_categories_nav(); ?>
    
    							</div>
    						</div>
    					</div>
    				<?php endif; ?>
    
    			<?php
    			
    			return;
    		endif;
    	}
    
    add_action( 'woodmart_after_header', 'woodmart_page_title', 10 );

    Regards

    #23536

    sandervdb
    Participant

    Works like a charm thnx !!!
    Only one little thing, i cant hide the page title.
    HOw can i remove the title in that bar ?

    #23538

    sandervdb
    Participant

    The title is fixed with this quick and dirty optie in CSS:

    .shop-title-wrapper h1 {
    color: #282828; /* Change text color */
    }

    Maybe there is another/better solution, because the option in article (hide title) does work here

    #23543

    Artem Temos
    Keymaster

    We have removed it for you. Please, check now.

    #23544

    sandervdb
    Participant

    Great thnx !!

    Great theme and support !
    Keep it up 🙂

    #23551

    Artem Temos
    Keymaster

    You are welcome!

Viewing 20 posts - 1 through 20 (of 20 total)

The topic ‘Shop categories menu on other pages’ is closed to new replies.