Title for category page

Requests for new features. You cannot post to this forum because new feature requests are not accepted any more.
Forum rules
New feature requests are no longer accepted, so you cannot post to this forum any more.
Locked
sykic
Posts: 22
Joined: 24 May 2010, 03:25
Location: Cambridge

Title for category page

Post by sykic » 27 May 2010, 04:18

To have a title on the Category page(ie category : sub cat : sub cat etc )

I added following in category.php under <div id="content">
Gives a title to category page


<h1 class="posttitle"><?php $t = substr($query_string,14); $tt = str_replace('%2F',' : ',$t); echo ucwords($tt); ?>
</h1>

Might be helpful to someone else
could not find another way to do this

Wasn't sure where to post this

gerard
Posts: 7
Joined: 18 Apr 2010, 23:46

Re: Title for category page

Post by gerard » 15 Jun 2010, 22:58

Hi - thanks for this - exactly what i have been wanting to do.

However, having very limited skills, I am having some troubles.
- I have added the code to the file you indicated, however the path is not being displayed. The appropriate part of the file is shown below. Can you see a problem?

- Otherwise, It would be awesome if you could provide the code for a complete php file so I can add this via the "define custom php" option without having to modify any of the suffusion files.

- Finally, do you think there is a way to have the category/sub/sub path display in the body of the post?
- - I have many categories and sub-categories in my site, and some of the sub-categories have the same name. To display the full path will make it less confusing when you are selecting something.

www.platformtechnologies.org.

Thanks!


------------------------------------
<div id="content">
<?php
if ($suf_category_excerpt == 'list') {
include_once(TEMPLATEPATH . '/layouts/layout-list.php');
}
else if ($suf_category_excerpt == 'tiles') {
suffusion_after_begin_content();
include_once(TEMPLATEPATH . '/layouts/layout-tiles.php');
}
else {
suffusion_after_begin_content();
include_once(TEMPLATEPATH . '/layouts/layout-blog.php');
}
?>
<h1 class="posttitle">
<?php $t = substr($query_string,14); $tt = str_replace('%2F',' : ',$t); echo ucwords($tt); ?>
</h1>

---------------------------------------------------------

Dark_Fox28
Posts: 574
Joined: 26 Nov 2009, 08:40
Location: Scotland
Contact:

Re: Title for category page

Post by Dark_Fox28 » 15 Jun 2010, 23:16

I think there are plugins to do this, try searching the plugins from your wordpress admin.

gerard
Posts: 7
Joined: 18 Apr 2010, 23:46

Re: Title for category page

Post by gerard » 15 Jun 2010, 23:45

Dark_Fox28 wrote:I think there are plugins to do this, try searching the plugins from your wordpress admin.
I have looked quite extensively but haven't found anything to to what I want.... But it is easy to miss a plugin given the massive number of them... I'd gladly take suggestions...

Locked