Ethos blog (category) description

Hi,

As you can see here: http://nleqib-vilikagni.savviihq.com/categorie/vacatures/

I have set up a Ethos site with post carousel slider. I want to display the category description (see image). With X there was a solution in the old forum to change the landmark header template. Obviously this does not work anymore in Pro. I could not find a new thread yet with the same question for Pro…

How can we get this to work in Pro?

Thanks!

Hello There,

We’re sorry for the inconvenience this has caused you. Unfortunately it is not possible to add the Category title to Pro at the moment because the setup right now is the header built using the builder totally occupies the top part. For it to be added, our development team are working on an element in the Header Builder which you will be able to use to add that title and breadcrumbs. To follow up the state kindly check this page:

https://theme.co/apex/forum/t/troubleshooting-pro-known-issues/203

Hi @Lely,

Is there any time frame? I see the next update is not including a fix. We have a bunch of Pro sites which are waiting to be released soon. This (basic) functionality can not be lacking in a proper site…

Hi There,

Those are not bugs so there will be no fix for it. In Pro those content that we see on landmarks (title, description, breadcrumbs) will be added as elements on the future so we can place it anywhere on the header/footer. Regretfully we can not provide an ETA, but definitely it is on the road map.

Thank you for your patience.

Hi,

I’m not saying it is a bug, but breadcrumbs for instance is a essential (basic) functionality which should include to the options building a site. No problem you need some more time to add this to the features of Pro. This is also not what my question is about…

Also I am wondering, you say it will be included as elements for the header and footer builders. But what I am asking for is a basic description above a certain blog category (http://nleqib-vilikagni.savviihq.com/categorie/vacatures/) as shown also in the screenshot (only text, no breadcrumbs or whatsoever). With X we always were provided with some code for a template change to add some content to these kind of pages. This is not possible anymore? Otherwise I could already make use of a extra header only for this category and add a simple content area in it, but I cannot choose a header on category level, only for pages, all posts and indivdual posts. How come categories are not displayed as a option to display a different header?

Thanks for the answer and hope you can help me out here.

Cheers.

Hi There,

That is another functionality that is on our roadmap, to add all archive pages, including categories and tag pages on the assignment area of the builder. Unfortunately for now, to set Pro header on category pages, we have to set it as global header on the assignment area.

For the meantime, please try adding this custom code to add the title back on the category pages:

 				add_action('x_before_view_global__index', 'x_classic_header', 99);
			
			function x_classic_header() {
				
				$disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );
			$disable_filters    = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true );
			
			 if ( is_category() || x_is_portfolio_category() ) : 
			
			  $meta     = x_get_taxonomy_meta();
			  $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
			  $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';
			
			  ?>
			
			  <header class="x-header-landmark x-container max width">
				<h1 class="h-landmark"><span><?php echo $title ?></span></h1>
				<p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
			  </header>
			
			
			  <?php endif; 
			
			}

Hope this helps.

Hi @Lely,

Thanks, that explains a lot and is a fine solution for the mean time. I just love how we always come to a solution with you guys! I have edited the code a bit so that it display only the text and will return the content only to the given category (not all category’s). For the ones interested:

// Display the post category title and attach it to a category, change category to your liking.
// =============================================================================
	add_action('x_before_view_global__index', 'x_classic_header', 99);
			
			function x_classic_header() {
				
				$disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );
			$disable_filters    = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true );
			
			 if ( is_category(vacatures) || x_is_portfolio_category() ) : 
			
			  $meta     = x_get_taxonomy_meta();
			  $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
			  $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Hier komt een stukje introductie over de vacatures, aan te leveren door Eqib. Hieronder het overzicht van alle vacatures. Gebruik de filters om snel de ideale vacature te vinden. ", '__x__' ) 
			
			  ?>
			
			  <header class="x-header-landmark x-container max width">
				<h1 class="h-landmark"><span><?php echo $title ?></span></h1>
				<p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
			  </header>
			
			
			  <?php endif; 
			
			}

Thanks again and cheers!

Hi,

Thanks for sharing the code.

Have a great day! :slight_smile:

This code was great for adding a description before the product array. Is there code to add the category description after the products display? (This is for SEO)

Hi,

You can change this line

add_action('x_before_view_global__index', 'x_classic_header', 99);

to

add_action('x_after_view_global__index', 'x_classic_header', 99);

For more information on this, kindly refer to the link below.

https://theme.co/apex/forum/t/customizations-actions-and-filters-in-x/208

Hope that helps.

Thanks. The position still is not where I want it.

Is there a list of locations like ‘x_after_view_global__index’ so I can find the location I need.

Hi,

It’s listed on the link I have provided.

Or you can check the actual file.

eg. In wp-content/themes/pro/framework/views/ethos/wp-index.php

add_action('x_after_view_global__index', 'x_classic_header', 99);

Hope that helps.