homepage Welcome to WebmasterWorld Guest from 54.204.215.209
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

    
Can A Category Have Two Descriptions (or a custom field)?
Want text to appear above AND below list of posts
Planet13




msg:4435064
 1:30 am on Mar 30, 2012 (gmt 0)

Hi there, Everyone:

Is there a way on CATEGORY pages to have text that appears Above the loop of posts, and different text below the loop of posts?

I want my page to look something like this:

Category Description Text
Links to posts
More Text

I tried this plugin:

Category Custom Fields

But it doesn't seem to be compatible with WP 3.3.1 as you can't ADD a custom field to a category that already exists (you have to add the custom field at the time you CREATE the category).

Thanks in advance.

 

lorax




msg:4435065
 1:41 am on Mar 30, 2012 (gmt 0)

You can if you create your own template. [codex.wordpress.org...]

Planet13




msg:4435070
 1:52 am on Mar 30, 2012 (gmt 0)

You can if you create your own template.


Lorax, surely you jest. I have a hard enough time trying to remember to put on pants before heading out the door.

I might try a plugin called headspace 2, as there is a description here:

[iamseo.org...]

I will report back.

lorax




msg:4435072
 2:00 am on Mar 30, 2012 (gmt 0)

LOL - twas not jesting but I completely understand. Let us know how it works out for you.

Planet13




msg:4435084
 2:46 am on Mar 30, 2012 (gmt 0)

Well, headspace2 seems to be working, but it is a bit of overkill.

It's one of those "all-in-one" SEO plugins. So there are dozens of different settings. Although apparently you can disable the ones that you don't want and it won't add to the overhead.

The other drawbacks are that you can't specify that the custom field input should ONLY appear on the Category admin pages (it shows up on the Post admin pages, too).

The other thing is that the input field is only kind of a small text field (it would be nice if it had it's own editor, but I guess you could edit what you want in the description input text box, then cut and paste into the custom field text input.)

Planet13




msg:4447369
 4:34 am on Apr 30, 2012 (gmt 0)

I wonder if anything else has turned up in the meantime.

I need to add some footer content to a category, but headspace2 is probably NOT the ideal way to do that (the textbox is tiny, and pasting lots of html code into it is mind numbing).

Coral




msg:4461335
 7:06 pm on Jun 4, 2012 (gmt 0)

You can do something simple like adding the two descriptions in the Description field, and putting a delimiter between each description.

The category description top|The category description bottom.

<?php
$data = category_description();
list($catdescriptiontop,$catdescriptionbottom) = explode("|", $data);

?>

... then just echo esc_html ( $catdescriptiontop );
echo esc_html ( $catdescriptionbottom );

where you want each description to appear.

edit archive.php

rocknbil




msg:4461677
 3:37 pm on Jun 5, 2012 (gmt 0)

So the approach I mentioned here [webmasterworld.com] doesn't work for you?

mhansen




msg:4461721
 5:46 pm on Jun 5, 2012 (gmt 0)

I usually do the custom coding thing myself to have finer control, but if I recall, there is a plugin named "Category Page" (http://wordpress.org/extend/plugins/page2cat/) that allows you to assign a "page" to the head of a category. Maybe there are some functions you can siphon off to get what you need?

It may even provide some functionality that allows you to write a full page, use shortcodes to cycle through your posts, then add more content below.

Disclaimer: I am not associated with the plugin, and I haven't used it in a long time. Do your own diligence.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved