Jump to content


Photo

How To Display Title on Category Page


  • Please log in to reply
8 replies to this topic

#1 terachilds

terachilds

    Member

  • Members
  • 12 posts
  • Country: Country Flag

Posted 26 July 2011 - 08:17 PM

How do I get the Category Name to display as a title on a category page? ex/ to have Books by TLC show as h1 title on http://teralynn.com/books/ I've found a code suggestion:

But I'm more comfortable with HTML and CSS than PHP and I'm not sure where to place the code. Is there an easier way to do that? If not, in what file do I place the code and where? Thank you! Tera

#2 Sourena

Sourena

    Advocate

  • Members

  • 563 posts
  • LocationWilliamstown, MA
  • Framework Version:2.4.1
  • Country: Country Flag

Posted 27 July 2011 - 12:21 AM

Place it inside "functions.php". It is located in "Platforbase" folder. (I assume you have activated "Platforbase" not "PlatformPro" since that is the way you customize your theme.)

#3 terachilds

terachilds

    Member

  • Members
  • 12 posts
  • Country: Country Flag

Posted 27 July 2011 - 12:27 AM

Thank you! But when I tried to paste that line of code into the "functions.php" file my site won't display and I get a php error. Is there something wrong with the code? Or somewhere specific I should place it in the file?

#4 Sourena

Sourena

    Advocate

  • Members

  • 563 posts
  • LocationWilliamstown, MA
  • Framework Version:2.4.1
  • Country: Country Flag

Posted 27 July 2011 - 12:36 AM

Most probably you have it on the wrong place or missed a letter or part of the code. Remove The code you placed thereand reload your site to make sure it works. Then try to find a line in "functions.php" that says "// ADDING NEW TEMPLATES //". Place the following lines of codes right before that: /* Adding new category titles. The default category title is hidden using CSS (.current_posts_info). */ add_action('pagelines_inside_top_theloop','cat_title'); function cat_title(){?>


#5 terachilds

terachilds

    Member

  • Members
  • 12 posts
  • Country: Country Flag

Posted 27 July 2011 - 12:44 AM

Okay, I did that. But I then I get this error when I load my page: Parse error: syntax error, unexpected '?' in /hermes/web11/b1138/moo.creativeblipcom/teralynn/wp-content/themes/platformbase/functions.php on line 92 Thank you AGAIN!

#6 xcel7

xcel7

    Advanced Member

  • Members

  • 45 posts
  • Framework Version:Wordpress Version: 3.8.2
  • Country: Country Flag

Posted 21 June 2013 - 12:49 PM

Hello,

I found the place to paste the code, but I get an error too. Is the code right?

 

/* Adding new category titles. The default category title is hidden using CSS (.current_posts_info). */ add_action('pagelines_inside_top_theloop','cat_title'); function cat_title(){?>

title(); ?>

#7 greenfly

greenfly

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 21 June 2013 - 01:33 PM

Hello xcel7

 

Please could you create a new topic with all the information and we will take a look for you. 



#8 KristaD

KristaD

    Member

  • Members
  • 26 posts
  • Country: Country Flag

Posted 11 August 2013 - 06:28 AM

Did this ever get resolved? I need help with this too.



#9 Danny

Danny

    Is Awesome!

  • Moderators
  • 15120 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 11 August 2013 - 12:28 PM

Hi,

 

This topic is over two years old and the solution provided above, will most likely not work for PageLines Framework or DMS. Therefore, can you please create a new topic.