![]() |
|
Home | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]() (I am using the filter by price widget in this question.)
I see that once I click on a filter by price link, the same category title is used in the price filter. I am wondering if there is a way to create a unique title based on the price as well as the current category. This is a good example. They use the category name but also get under $50 into the title. Store ID 6719 www.forbabygifts.com |
#2
|
||||
|
||||
![]() This works for me in the <head> elements:
PHP Code:
__________________
![]() ![]() ![]() ![]() |
#3
|
|||
|
|||
![]() In the filter by price widget head elements? I tried it there and do not see changes.
Any ideas? |
#4
|
||||
|
||||
![]() No, in the CATEGORY PAGE > Default > View menu > View <head> Elements section.
__________________
![]() ![]() ![]() ![]() |
#5
|
|||
|
|||
![]() I have views created for my category pages. (I did try it in default but no dice).
I did it in one of my views, but when I added the price widget, my left navigation disappeared. You can see it here This is what I added to the <head> elements of that view <?php function format_price($price) { $price = strip_tags($price); $price = explode("-", $price); if (trim($price[0]) == '') $html = 'less than $'.$price[1]; elseif (trim($price[1]) == '') $html = 'more than $'.$price[0]; else $html = '$'.$price[0] . ' - '. '$'.$price[1]; return $html; } ?> <title>Christening Rosaries | Christening Rosary Gift Ideas | [store.if page="on"] | page [store.page] | [/store.if]<?php if (@$_GET['price']) { ?> Price is <?php echo format_price($_GET['price']); ?> | <?php } ?> </title> |
#6
|
||||
|
||||
![]() I inserted your exact code into my test site and it worked fine.
You can see that it does work here where you have added the code to the <head> element. Regarding your sidebar disappearing, are you sure it's related to the <head> code? Could it be something in your widget settings? Eric
__________________
![]() ![]() ![]() ![]() |
#7
|
|||
|
|||
![]() I think it is due to my widget settings. And your example looks great! That is exactly what I wanted.
|
#8
|
|||
|
|||
![]() But this is weird. If I use the tag cloud setting, my left nav stays with the tag cloud. When I switch it to price filter, my left navigation disappears.
|
#9
|
||||
|
||||
![]() Are you clicking "Save" when you make an edit to the widgets on the WP widgets page?
__________________
![]() ![]() ![]() ![]() |
#10
|
|||
|
|||
![]() Yes, and after I refresh the page, it vanishes.
|
#11
|
||||
|
||||
![]() Are you using some type of widget context filter plugin?
__________________
![]() ![]() ![]() ![]() |
#12
|
|||
|
|||
![]() I am using the Widget Context plugin. And I have it set to Show on Selected and store/category* assigned to it.
|
#13
|
||||
|
||||
![]() What happens if you remove the extra <title> stuff that we did? Does the widget come back?
__________________
![]() ![]() ![]() ![]() |
#14
|
|||
|
|||
![]() Yes, it does.
|
#15
|
||||
|
||||
![]() Maybe try renaming the function call from format_price to forbabygifts_format_price. Maybe it's conflicting with another function.
PHP Code:
__________________
![]() ![]() ![]() ![]() |
#16
|
|||
|
|||
![]() Tah-Da!!!!! .....and Thank you!!
Now, one last question, if I also want to do this with filter by merchant widget, is there a code for that as well? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add filter for sale price in the Merchant Discovery Tool | ayorofrance | Feature Requests | 1 | March 31st, 2012 11:16 AM |
How to "SEO" Handle Tags, Merchant, Price Searches pages? | cashnow | Questions | 14 | January 26th, 2011 08:58 PM |