Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Custom static content at top of category page (http://forum.bytesforall.com/showthread.php?t=15110)

valsouza Aug 13, 2011 06:24 AM

Custom static content at top of category page
 
Hi

I need to have some custom static content, essentially an image and a small description, at the top of each category page (different for each category of course), displayed above a list of titles of the category posts with or without excerpts.

I know there must be some simple solution to this, but even after searching the BFA forums and the Web in genera, l I just haven't been able to hit upon the right way to do it.

I did try the 'List Category Posts' plugin and this worked well for other pages, but I just couldn't understand where to insert the plugin's shortcode for the generated Category page.

Please help!

Thank you.

- Val Souza
www.saligaoserenade.com [redesign in progress]

paulae Aug 13, 2011 06:50 AM

There is probably an easier way, but when I needed to have custom images and text at the top of each category page, I created a new widget area for each one and populated them with text widgets calling each image, with associated text. Then I added all of the widget areas to the center column, using the theme options. This was with Atahualpa 3.6.5, in the Content Above the Loop section. This is what the code looks like:

Code:

<?php bfa_widget_area('name=letters'); ?>
<?php bfa_widget_area('name=milestones'); ?>
<?php bfa_widget_area('name=obit_widget'); ?>
<?php bfa_widget_area('name=history'); ?>
<?php bfa_widget_area('name=gardenguide'); ?>
<?php bfa_widget_area('name=news'); ?>
<?php bfa_widget_area('name=dineandwine'); ?>
<?php bfa_widget_area('name=books'); ?>
<?php bfa_widget_area('name=teenhealth'); ?>
<?php bfa_widget_area('name=careerdoc'); ?>
<?php bfa_widget_area('name=politics'); ?>
<?php bfa_widget_area('name=biznews'); ?>

You can see it in action at http://larchmontgazette.com. Click on News, Obituaries, Letters, etc., in the top menu, to see the custom images and text. We are no longer publishing except for new obituaries, so the site looks a little bare, especially the sidebars where ads used to be, but it's still functional.

I'm a little surprised this is still working, since I did upgrade to the latest WP version, and I thought the PHP functions couldn't be added anymore to the theme in this manner, but maybe it's still working because I didn't upgrade to the latest version of ATA. I don't know. I'm sure Juggledad or Larry may have more thoughts on this issue.

juggledad Aug 13, 2011 06:58 AM

I would add a new widget area (in index.php just above the line
HTML Code:

                <?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
then add a text widget with code to display what you want.

valsouza Aug 13, 2011 09:32 AM

Thanks Paula and Juggledad. I think the widget idea will work for me.

What remains now is to get rid of the category posts with excerpts and allow only the post titles to display on the category page.

I know I should probably be replacing "the_excerpt()" with "the_title()" in some php file, but which one?

- Val


All times are GMT -6. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.