• 0
Sign in to follow this  
Followers 0

Category Title

Question

Posted · Report post

Need to add a category title.... this code worked in PlatformPro but not in Framework. Please advise. I have the titles enabled in theme.

//ADD CATEGORY TITLE AT TOP OF CAT PAGES
	add_action('pagelines_inside_top_theloop','cat_title');
	function cat_title(){
		if ( is_category() ) {
			echo '

'.single_cat_title('',false).'

'; } }[/code]

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0

Posted · Report post

Have you gone to Dashboard > PageLines > Templates then clicked in the image map where it says Content Area (right image)? Down below that, you should see "Category" in a group of templates. Below that, you'll see drag and drop options. Make sure Posts Info is at the top of your category page above PostLoop. This should show "Currently viewing the (category name):"

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Yes... it is clicked... however I wanted a regular title as in the Pages on the Category Page. So I put this code in CSS to get rid of the currently viewing... [code].current_posts_info{display:none;}[/code] So I guess the question now is, how can I display the title of the Category on the category page the same as on other pages in Frameworks

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Also tried this.... and still not working... [code]//ADD CATEGORY TITLE AT TOP OF CAT PAGES add_action('pagelines_inside_top_theloop','cat_title'); function cat_title(){ if ( is_category() ) { ?>

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Where have you added this code? To functions.php?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Yes. In the base theme

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Got it... Here is the code to add category titles on category pages similiar to page titles. Frameworks > base theme > functions.php [code]//ADD CATEGORY TITLE AT TOP OF CAT PAGES add_action('pagelines_inside_top_postloop','cat_title'); function cat_title(){ if ( is_category() ) { ?>

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks for posting the solution!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0