Jump to content

Archived

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

foley

Show category and tag description

Recommended Posts

foley

Hello

 

Im my recipes blog menucocina.com im using Pagelines Free Version.

 

I would like to show the category and tag description when I click in a category or in a tag. It would be something like this:

 

[attachment=2421:pregunta-categoria-descripcion.png]

 

I have read the documentation from wordpress http://codex.wordpress.org/Function_Reference/category_description but it seems that platform is a bit different from other themes.

 

Can you help me?

 

Thank you

 

 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

In order to display something like category/tag description on your category/tag page, you will need to use a hook along with the following WordPress functions:

 

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

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

 

You can learn more about hooks here - http://blog.teamtreehouse.com/getting-aquainted-with-wordpress-action-hooks

 

Also, please be aware that we no longer provide support for Platform or Platform Pro, as the theme has been considered a legacy theme for over three years. I would highly recommend you upgrade to DMS and take advantage of all the awesome DMS features. I have also moved your topic to the correct forum, as you have posted in the DMS forum.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
foley

Hello again Danny

 

I was reading this topic  http://forum.pagelines.com/topic/25902-page-templates-missing-in-pagelines-platform/

 

The interesting part is this:

 

"In Platform if you were to enter more content into that area the easiest way would be to add a text widget with the text in to the universal sidebar, then place the universal sidebar into the content area like - http://screencast.com/t/YZKEWXbU3OwN  "

 

So, if I am understand correct, what i have to do is this:

 

- Put the Universal Sidebar in the "Page Content Area Template Sections"

- Create a text widget to show the code :

<?php echo category_description(); ?>

I know that i have to use a plugin to let the use of PHP in text widget

 

And with all this it should work and show the category description above the list of posts from that category?

 

Thank you

 

 

 

 

Share this post


Link to post
Share on other sites
Danny

That isn't related to your issue in my opinion. Also, you can not add PHP to a widget nor would I recommend it. If you want to display your categories description, you will want to use a hook or see if there is a plugin that allows you to do it via a shortcode.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
foley

Oh, i thought it was related.

 

I will continue searching how to perform that hook.

 

Thank you Danny ;)

Share this post


Link to post
Share on other sites
Danny

No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • JP
      By JP+
      Hello,
      We are working on a 2 languages site (https://liguecardioliga.be) with wpml, and lately the call of a category in the loops section (and all the sections requiring a category to select posts) doesn't work in the translated language. It worked well until recently so I wonder if it's because of a recent update (wordpress, wpml, pagelines, a plugin?). Anyone has the same problem? a solution?
      TIA
    • mno
      By mno+
      Is there a way to mass apply a template to all tag archives?
      We are using Powerloop
    • mzhafzah
      By mzhafzah
      Hello
      I am using DMS 2 theme and I want to create a 2 different links on my website; each link should take you to a different blog post category. Although the process is easy, yet I can not figure out how to give each category page a unique design of its own; Any change I make on any page is applied to the other (I'm aware of the universal elements like the header and footer and I a am not talking about these.)
      Since I am new to wordpress in general, I am not sure if my description is sufficient; apologies if it is not.
      TycoonJé
    • morrisjohnc
      By morrisjohnc
      Hello,
       
      My blog has two separate types of post content, both of which need to be created as posts, not pages, in WP.
       
      On the category pages, Bespoke pulls the featured image and the 10 word excerpt (or whatever is provided for in the excerpts post field).  How can I get certain categories to show the full content of a post and others this standard format with the "read more" button?
       
      Question 2 - Is it possible to have different templates for different category listing pages?  Example, use the postloop for one category and the masonic gallery for another?
       
      Thank you in advance for your help!
    • aldisney
      By aldisney+
      Hi--
      I was wondering if there was a relatively easy to way automatically assign a thumbnail to a post category when displaying posts in the Masonic Gallery format, when the post doesn't have a featured image? I've got a client with a ton of posts that just won't have any featured images, but each category has a header image. I'd like to display the header image as the thumbnail for all these posts, since, going forward, my client does actually plan to use featured images.
       
      Thanks!
×