-
AuthorPosts
-
February 7, 2011 at 2:13 pm #4419hotstreakGuest
I have a blog where all of my categories are the 50 states of the United States. Much of my content has more than 1 category. What I am looking for is a way to replace the “state” name in each post. For example: Filed under categories “Pennsylvania” and “Florida” is the post:
Buyers are enticed by the ‘almost too good to be true’ prices they see on short sales and foreclosures. I’ve found that many buyers don’t really understand the downsides to these types of deals and will do my best to give you some basic information to help you make better decisions. You’ll want to know enough about this so that whether you are considering buying Clearwater homes or Dunedin condos you’ll be better prepared for the typical issues that can come up.
But I want it to look like:
Buyers are enticed by the ‘almost too good to be true’ prices they see on short sales and foreclosures in[state] . I’ve found that many buyers in[state] don’t really understand the downsides to these types of deals and will do my best to give you some basic information to help you make better decisions. You’ll want to know enough about this so that whether you are considering buying[state] homes or condos you’ll be better prepared for the typical issues that can come up in[state] .[state]So, when someon visits the post under the Pennsylvania category, it looks like:
Buyers are enticed by the ‘almost too good to be true’ prices they see on short sales and foreclosures inPennsylvania . I’ve found that many buyers inPennsylvania don’t really understand the downsides to these types of deals and will do my best to give you some basic information to help you make better decisions. You’ll want to know enough about this so that whether you are considering buyingPennsylvania homes or condos you’ll be better prepared for the typical issues that can come up inPennsylvania .PennsylvaniaAnd the same would be for Florida or whatever state (category) page my visitors are on.
Can someone please point me in the right direction??
TY
February 7, 2011 at 2:22 pm #5355Aakash ChakravarthyKeymasterI think
this is not an issue with Shortcoder wordpress plugin. This is an unrelated topic related to this plugin.Anyway, the solution is … you have to add this code to the functions.php file in your theme directory anywhere:
Code:function shortcode_print_category( $atts ) {
return single_cat_title();
}
add_shortcode( ‘state’, ‘shortcode_print_category’ );
I’ve not tested but should work. -
AuthorPosts
- The topic ‘I need help with Shortcoder!’ is closed to new replies.