- Posts: 2
COMMUNITY FORUM
Adding superscript character to K2 item title
- Justin T
-
Topic Author
- Offline
- New Member
Less
More
14 years 2 months ago #94928
by Justin T
Adding superscript character to K2 item title was created 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
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.
- Terry Britton
-
- Offline
- Elite Member
Less
More
- Posts: 198
14 years 2 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.
<?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
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 2
14 years 2 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
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.
- Terry Britton
-
- Offline
- Elite Member
Less
More
- Posts: 198
14 years 2 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.
- Chad Windnagle
-
- Offline
- New Member
Less
More
- Posts: 2
13 years 9 months 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
-Chad
Please Log in or Create an account to join the conversation.