Keyword

Adding superscript character to K2 item title

  • Justin T
  • Justin T's Avatar Topic Author
  • Offline
  • New Member
More
13 years 6 months ago #94928 by Justin T
I have numerous sites using K2 as a product catalogue and as such many of the products require the ® character to show the product is registered.  Currently if I use ® in the title it puts it as the same size and position as any other text. 

 

I would really like to know if its possible to make this character appear as superscript in the title.

 

Thanks

Justin

 

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #94929 by Terry Britton
Replied by Terry Britton on topic Adding superscript character to K2 item title
In item.php and category_item.php search for <?php echo $this->item->title; ?>.  Replace this with the following:

 

<?php

$title = str_replace ("&reg", "<sup>&reg</sup>", $this->item->title);

echo $title;

?>

 

I've never tried this with replacing an &, but it should work.

Please Log in or Create an account to join the conversation.

  • Justin T
  • Justin T's Avatar Topic Author
  • Offline
  • New Member
More
13 years 6 months ago #94930 by Justin T
Replied by Justin T on topic Adding superscript character to K2 item title
Hi,

 

Thanks for the help.  That did work, albeit I had to change the &reg that it looked for to regd as it didnt appear to like the & symbol.  All good now.

 

Cheers

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #94931 by Terry Britton
Replied by Terry Britton on topic Adding superscript character to K2 item title
Yeah, I wasn't sure it would like the ampersand character.

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #94932 by Chad Windnagle
Replied by Chad Windnagle on topic Adding superscript character to K2 item title
I would really like to see this as a plugin. I'm going to have 10+ k2 templates that I'll have to modify and keep track of to do this.

 

-Chad

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum