Hi David,
I've been able to modify PT to my needs with help from forum entries, but I'm stuck now. I'll start with my first problem:
I would really like to be able to use the SEO for Yoast plugin, but when I activate it the Product titles are not being created. It just shows the "Abonnementen (= my Category Base HREF) | Sitename" as a meta title, regardless if I link from the ATOZ categories or from Wordpress pages with [pto search = "category:something"]
in the body. When I disable the SEO plugin the product title shows up fine.
I don't know if it's related, but whether I disable or enable the SEO plugin, when I navigate in a category page to for example page 2 , the Page title also shows "CategoryName | 2" (with SEO disabled) or "Abonnementen | 2" (with SEO enabled). So the URLname is creating the Page title.
I've uploaded the original pto.php, pto_common.php and pro_search.php to see if any of the PTO Plugin modifications were to blame, but as far as I can see the problem remains. I'm sure I'm missing something...
I use the last Wordpress 3.8.1 and Wordpress for Yoast (Called Wordpress SEO nowadays I see in my Pluginpage) version 1.4.24.
Can you point in the right direction? Thank you!
With kind regards,
Marlies
Hi David,
You're great, now there's a Productname in the meta title!
What still remains is the forming of the content Pagetitle, for example the category Kranten:
http://www.sitename.nl/abonnement/kranten/ produces a content Pagetitle (& Meta Title) called 'Kranten'
http://www.sitename.nl/abonnement/kranten/2.html produces a content Pagetitle (& Meta Title) called 'Kranten | 2'
I prefer it just to be 'Kranten'
Kind regards,
Marlies
Hi Marlies,
If you'd prefer pages 2 onwards not to have the page number in the title, in pto.php look for the following code at line 276:
$title .= " | ".$pto_page;
...and either comment out or delete.
Similarly, the sort value (if not the default) is also appended by virtually the same code at line 281 which could also be commented our deleted if not required in the title.
Cheers,
David.
--
PriceTapestry.com
Hi David,
It's all working now, great!
My next and final issue for the time being :-) is this: I have made all generated url's lowercase and it works fine, I implemented the code as you suggested here:
http://www.pricetapestry.org/node/125
The only thing is that now also the Category Pagetitle and the Meta title are also lowercase, when I address them through the ATOZ. I would like them to be uppercase as the rest of the site (blog etc.). I'm not sure how to handle this.
Hope you can help me again!
kind regards,
Marlies
Hi Marlies,
At line 272 in pto.php (close to the above modifications) you'll find this code:
$title = htmlentities($pto_q,ENT_QUOTES,get_settings("blog_charset"));
...so for all upper case, you could REPLACE with:
$title = htmlentities(strtoupper($pto_q),ENT_QUOTES,get_settings("blog_charset"));
Or alternatively for "Name Case", in place of strtoupper use ucwords...
Cheers,
David.
--
PriceTapestry.com
Hi David,
Since I also made changes to that peticular line in order to modify the meta tile as described in
http://www.pricetapestry.org/node/374
I changed
$title = htmlentities($pto_q,ENT_QUOTES,get_settings("blog_charset"));*/
$title_pto_q = str_replace(array(":","merchant","category","brand"),"",$pto_q);
$title = htmlentities(ucwords($title_pto_q),ENT_QUOTES,get_settings("blog_charset"));
Have a great weekend,
Marlies
Hello Marlies,
Try increasing the priority of PriceTapestry.org's title hook by editing pto.php and looking for the following code at line 614:
add_filter('wp_title','pto_title');
...and REPLACE with:
add_filter('wp_title','pto_title',999);
If still no joy, I'll set-up a test environment and check it out further for you...
Cheers,
David.
--
PriceTapestry.com