Notifications
Clear all

Adding 'Category' to 'Recent Stories' Block in "Snow White"

2 Posts
2 Users
0 Likes
2,082 Views
(@rrichardson)
Posts: 7
Active Member
Topic starter
 

Hi,

I have recently started using 'Snow White' on my archive (I have this as the default and the only option as I like to keep things neat and that way I know everything displays properly).  Anyway, my question is this:

How do I add the 'category' as a display on the recent stories block on the index?  I have very recently (this weekend) introduced a new fandom and would like to ensure it's clear to readers who have come for one fandom only which stories have been uploaded as new to the separate categories (and their sub categories).  Is there any way to do this?

Thanks in advance for the help.

My site archive is found here: http://www.bewitching-fiction.com/story-archive

PI

 
Posted : 24/08/2015 4:01 am
 SJP
(@sjp)
Posts: 66
Trusted Member
 

To add the category info to the recent block, you can open blocks/recent/recent.php.

Around line 13, you'll see

if(!$use_tpl) $content .= "<div class='recentstory'>".title_link($stories)." "._BY." ".author_link($stories)." ".$ratingslist[$stories['rid']]['name']."<br />".stripslashes($stories['summary'])."</div>";

You can add

".catlist($stories['catid'])."

where you want the category information.
For example,

if(!$use_tpl) $content .= "<div class='recentstory'>".title_link($stories)." "._BY." ".author_link($stories)." ".$ratingslist[$stories['rid']]['name']." ".catlist($stories['catid'])."<br />".stripslashes($stories['summary'])."</div>";

would add the category info after the story rating.
This assumes you're not using the default block style, not a .tpl to display the recent block (you can check this in the admin panel under blocks).

 
Posted : 24/08/2015 11:24 am
Share: