Forum Moderators: coopster

Message Too Old, No Replies

Wordpress Conditional Title for Posts

Trying to create a conditional style for post titles.

         

benbrooks

2:38 am on May 8, 2010 (gmt 0)

10+ Year Member



I am using a category in wordpress that is just for links that I post to the site. When I make a new post that is a linked title (using the Linked List plugin from Jonathan Penn) I want the title to be formatted differently that it is when I do a non-link post.

I am currently using this for my titles:

<h1><a href="<?php the_linked_list_link('url') ?>"><?php the_title(); ?></a></h1>


But I would like it to do this:

If this post is in the category links then it would display this:

<ll><a href="<?php the_linked_list_link('url') ?>"><?php the_title(); ?></a></ll>


and if it is not then it would display this:

<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>


I am terrible at PHP and would appreciate any type of help.

[edited by: coopster at 12:47 pm (utc) on May 11, 2010]
[edit reason] removed personal/specific domain name [/edit]

coopster

8:55 pm on May 19, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, benbrooks.

You'll need to determine how to discover the post is of the type you describe, a category link. Then you can add your conditional logic to how you want the link displayed.