Jump to content
Sign in to follow this  
bizint

Unique Content in Tag - Using Tag Title and Tag Description

Recommended Posts

bizint

Dear All, Simon created a great little new section php that I can drag into categories to create unique content that pulls the category title and category description. into the content area of my catgory pages: Things is I need exactly the same thing - but for Tags. Here is the code for the categories...does anyone know how to re-write this php so it works for tags too?! I tried just changing cat to tag...and it didnt work! <?php /* Section: Category Titles Author: Simon Author URI: http://www.pagelines.com Description: Add a category title! Class Name: Categorizer Workswith: templates, main Version: 0.1 */ class Categorizer extends PageLinesSection { function section_template() { $cat = get_category( get_query_var('cat'),false ); echo '

'; echo '

' . $cat->name . '

'; echo '

' . $cat->description . '

'; echo '
'; } } /* End of section class */ Thanks!!!

Share this post


Link to post
Share on other sites
bizint
Also does anyone know how to rewrite this code so that a thin line
is either side of the H3 heading?! PHP all new to me, only just figured CSS!

Share this post


Link to post
Share on other sites
catrina
Based on documentation, I think you'll need to change get_category to get_the_tags and $cat with $posttags (I'm referring to this documentation: http://codex.wordpress.org/Function_Reference/get_the_tags). As for the thin line on both sides of the H3 heading, it's easier to do with CSS like so: [code]body.CLASSFORCATEGORYHERE h3 {border-left: 1px solid #color; border-right: 1px solid #color;}[/code]

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
bizint
...no, that doesnt work...any ideas? Pross?!

Share this post


Link to post
Share on other sites
Rob
Hi, I'll alert Simon to your request. I know he's in a meeting at the moment but should be free shortly. Thanks for your patience.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
catrina
Thanks for letting us know. I think I can recall that info from a previous topic. :)

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
bizint
Soz to chase this but the categorizer worked so well. This little tag widget I'm after (that pulls tag title for header and tag description for content) is a going to be a brilliant little plugin to the theme. I've got 150 tag pages, all "duplicate" content. If I can pull in unique content (automatically) so its going to make these pages unique (that are ranking well anyway) it will help them perform much better for seo...so rather excited about getting it done, just need a little bit of help!

Share this post


Link to post
Share on other sites
Rob
Unfortunately, such customizations are outside the scope of the forum's support level. You need to hire a Pro or a developer of your own to do this. I'm sorry. We have no available answers for custom coding. We strongly recommend you engage one of our Pros via http://www.pagelines.com/pros. Thanks for your understanding.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×