Title Attribute and Menu Label with qTranslate All in One SEO Pack Feature Requests Forum

The support forums have a new home! Please visit All in One SEO Pack's new residence at Semper Plugins to purchase a support plan.

 
You must be logged in to post
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Title Attribute and Menu Label with qTranslate

Post
New Member

karlsan

posts 9

6:11 am September 7, 2009

Hello,

We're running a site with qTranslate and just installed AIOSP. We've used it before once in a while on single language sites and it's a great help – thanks!

What I wanted to check, was if it's possible to change the Title Attribute and Menu Label fields in the admin, so they accept short code? It would be great to have different SEO boxes for the different languages, sure, but that seems like quite a pipe dream so instead we're using short codes for the different languages, like this:

[:se]Swedish title[:en]English title

This works just fine for Title, Description and Keywords, but for some reason not Title Atrribute and Menu Label. The qTranslate author has a page about making a plugin work with his, which is essentially about using filters or Gettext. I looked at the AIOSP code but couldn't figure out what to change. Since it works for title, description and keywords, perhaps it would be easy to add for title attribute and menu label too? That would be great!!

Thanks, Karl

New Member

karlsan

posts 9

6:55 am September 7, 2009

A quick follow-up:

I'd been working with PAGES when making the comment above. Having just made a couple of POSTS, I spotted that they only have the first three boxes (Title, Description and Keywords), so I guess these three get processed in a way that Title Attribute and Menu Label don't.

If anyone has any info on where this can be changed, I would appreciate it!

New Member

angeleyes

posts 4

1:04 pm September 7, 2009

How do you use the qtranslate plugin?

New Member

angeleyes

posts 4

1:04 pm September 7, 2009

 .

New Member

karlsan

posts 9

6:55 am September 8, 2009

@angeleyes,

Pretty straight-forwardly – have two languages installed and qTranslate checks which content to display. Since there is no tab for different languages when it comes to adding AIOSP data for a post/page, I'm using short codes for adding it – [:se] and [:en]. As mentioned, this work OK for the fields on POSTS, but not for the Title Attribute and Menu Label which only appear on PAGES. So I guess these aren't filtered the same way and was wondering how one can get them added to the mix as well.

New Member

karlsan

posts 9

7:33 am September 29, 2009

Post edited 1:34 pm – September 29, 2009 by karlsan


OK, I had another look at this and think I figured it out. In all_in_one_seo_pack.php on lines #677 and 679, the $title_attrib and $menulabel variables are output. What I did was add __() around the variables, like this for #677:

$filtered = '<li class="page_item page-item-'.$postID.$matches[2].'"><a href="'.$matches[3].'" title="'.__($title_attrib).'">'.__($menulabel).'</a>';

and this for #679:

$filtered = '<li class="page_item page-item-'.$postID.$matches[2].'"><a href="'.$matches[3].'">'.__($menulabel).'</a>';

That works for me, now it filters out the correct language when using language shortcodes, even for menu label and title attribute.

Since this is posted in the "future request" part of the forum, it would be great to have a quick word from the programmers as to whether this can be added to an upcoming version or not.

Thanks!

Admin

WordPress Professional

Raleigh, NC

posts 442

7:44 am September 29, 2009

You must be a subscriber to view administrator posts. Click here to purchase a support subscription.

For what shall it profit a man if he shall gain the whole world and lose his own soul

New Member

karlsan

posts 9

8:16 am September 29, 2009

Thanks a lot and thanks again for a great plugin! Have a nice day.


About the WordPress Developer Forum

Forum Timezone: America/New_York

Most Users Ever Online: 205

Currently Online:
17 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 5
Forums: 23
Topics: 1543
Posts: 3447

Membership:

There are 6357 Members

There are 4 Admins
There are 3 Moderators