Jump to content

Archived

This topic is now archived and is closed to further replies.

altonc

Category Descriptions in Header (or elsewhere) on Archive Pages

Recommended Posts

altonc

I'm trying to get a description to display at the top of a category archive page (auto generated). Like this - where this information is defined in the header, and the category archive below.

 

I've added descriptions to each category (Dashboard > Category > Edit Category). There's a statement there under the description box "The description is not prominent by default; however, some themes may show it." It seems DMS does not.

 

I've tried adding sections (Text Box, etc) to the Header and using the "global" or "local"  Section Options as defined in this forum post  (I couldn't get this to work in general) wasn't working out as an option either.

 

If you have any suggestions, please be specific as I'm a newbie. If there's a CSS solution please paste representative code.

Much appreciated.

 

Thanks,
A

Share this post


Link to post
Share on other sites
Danny

Hi,

 

If you want to have the category name appear like this, you will need to use a hook, see our hooks documentation for advice and examples and see here for info on the category function.

 

http://codex.wordpress.org/Function_Reference/get_the_category


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
altonc

Thanks for the suggestion. I'll look into that option.

 

I have to ask about using the "global" or "local"  Section options as an alternative - since, by all descriptions this should work too.

As I mentioned, I've not been able to get those to work as expected. Whatever component I placed in the header section, or elsewhere, and only altered the content in the "local" option, the effect was still global.

Here's a demonstration

I set a text box in the header and only changed the "local" title. No matter which page I edit, all of the pages are updated to the last "local" edit.

 

Please advise.

Thanks.

Share this post


Link to post
Share on other sites
altonc

I'm noticing now this "local" may refer to the type of page being presented.

"local" Archive pages, or to a Post page. Headers (in this example) are consistent across page types.

Is that the way this works?  If so, it's not very clear and contradicts this forum post.

Share this post


Link to post
Share on other sites
Danny

Hi,

 

Local means the page you're currently working.

Global means that your settings will be used throughout your site.

 

Local overrides Global when set.

Local has nothing to do with a specific page or post, such as Archive. It simply means the what you're currently working on.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
altonc

OK, that's my understanding too, however, not the experience.

Changes in local are appearing globally.

I set up an experiment:

 

First…

This page has test copy in the header and the template. (a text box section with the copy added in the "local" section. The copy in both boxes says "This section option local test should say Eco-Crime" 

 

Next…

On this page placing text boxes in the same place and only changing the copy in the template section box - "local" only option that says "This section option local test should say Eco-Fashion and design".

 

In both cases, the local content from one distributes across and all other "local"ly placed copy on other archive pages. In other words, whatever local copy I change on one page, changes all the copy in that same location globally. You'll notice if you click on any category page link (right column), the same "local" copy last defined on the Eco-Fashion & Design page appears globally on all archive pages.

According to your statement that should not be the case.

Sorry to be thick, but what am I missing?

 

If this is not a function possible in the header, I can understand despite the claim here. However, how is the non-header local override content explained? 

 

Thanks,

A

Share this post


Link to post
Share on other sites
Danny

You're working on categories, categories are considered special pages by Wordpress. I understand what you're trying to do and have reported this. However, you would be best to use a hook for this kind of title.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×