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)
-   -   Category Description (http://forum.bytesforall.com/showthread.php?t=5838)

seoguy Feb 11, 2010 09:17 AM

Category Description
 
I would like to put a description at the top of all category pages as well as home page above where the posts display. Preferably with a wysiwyg editor.

Does anyone know of a plugin available? or hack?

thanks

reketeke Nov 30, 2010 05:05 AM

go to
EDIT POST/PAGE INFO ITEMS

and put this code in
kicker multipost pages

<?php if ( is_category() ) : ?>
<?php get_category($category) ?>
<?php echo category_description($category); ?>
<?php endif; ?>

eperon Dec 15, 2010 06:17 AM

im struggling with this idea too.

The suggested solution puts a description above each post on the multipost page. It should be just 1 description, above the list of articles...

juggledad Dec 15, 2010 07:17 AM

try adding the code to ato->Style & edit CENTER COLUMN->Content ABOVE the LOOP

emilyrose Jun 7, 2011 08:21 PM

Quote:

Originally Posted by juggledad (Post 52198)
try adding the code to ato->Style & edit CENTER COLUMN->Content ABOVE the LOOP

How to make the Category show above it? So far only the descriptions is showing.

juggledad Jun 8, 2011 03:41 AM

if you are using the example
HTML Code:

<?php if ( is_category() ) : ?>
<?php get_category($category) ?>
<?php echo category_description($category); ?>
<?php endif; ?>

you would need to add
HTML Code:

<?php echo $category; ?>

horsemansarts Sep 24, 2011 09:32 AM

This was very helpful to me. Thanks! I have the category description displaying BUT I would like to style it differently--more 'heading-like'. I have FireBug and I'm at a loss as to see how best to identify that particular bit of text. FB just says it is <p>??

juggledad Sep 24, 2011 02:07 PM

that <p> is an element nested in another element probably nested in another element. This where you need to know how to construct a CSS selector so you can apply the css rules (styling) you want. Look at the <p>'s parent elements and see if there is something unique that you can use to select it

horsemansarts Sep 24, 2011 05:51 PM

This is what I figured and I've done that a lot using Firebug in other situations. I just can't see where I can do that in this case. Maybe I'm missing something obvious. I just seems like anything I'd do would affect the <P> on the whole page. Here is the page if you care to take a look: http://www.iidageorgia.org/category/press-release/

Is there a way to change how that particular bit of text is formatted? Like change it to be some heading <H?> instead of <P>?

Thanks!
Sharon

juggledad Sep 24, 2011 07:31 PM

You could always wrap a <div> around the description like
HTML Code:

<?php if ( is_category() ) : ?>
<?php get_category($category) ?>
<?php echo '<div class="my-cat-desc">'.category_description($category).'</div>'; ?>
<?php endif; ?>

then use the class to style it

lmilesw Sep 24, 2011 08:02 PM

Or perhaps something like the following in CSS Inserts
HTML Code:

td#middle > p {
    font-size: 30px;
}


horsemansarts Sep 24, 2011 10:00 PM

Quote:

Originally Posted by juggledad (Post 72819)
You could always wrap a <div> around the description like
HTML Code:

<?php if ( is_category() ) : ?>
<?php get_category($category) ?>
<?php echo '<div class="my-cat-desc">'.category_description($category).'</div>; ?>
<?php endif; ?>

then use the class to style it

Thanks! That was the hint that I needed. It is working like a charm now. (after I figured out that there was a quote missing) :):)

juggledad Sep 25, 2011 03:11 AM

What you want EVERYTHING??? :p:p:p

horsemansarts Sep 25, 2011 08:28 AM

HA! I'm just teasing you. I would not have even mentioned it but I was just so proud of myself (being a non-programmer) for figuring out what was missing that I could not resist. ;) I appreciate you!
Sharon

horsemansarts Nov 1, 2011 09:04 AM

I'm working on another site and again want to place the category name on the category page but now I'm using a later version of Atahualpa which means I need to edit the index file. I've tried a couple of things but am not seeing it appear. So, can you tell me where I need to place the code in the index file to have the category name appear at the top of the category page (just once).

juggledad Nov 1, 2011 12:07 PM

try putting it just before the line (line 16 in 3.7.1)
HTML Code:

        <?php while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>


All times are GMT -6. The time now is 11:34 PM.

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