Page Title Format add Macros for Parent Pages 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

Page Title Format add Macros for Parent Pages

Post
New Member

chefben

posts 1

3:15 pm October 9, 2009

For sites that are using Wordpress as a CMS, adding the macro to pull in the page's parent for 3 or more levels deep would be a great feature.

%page_parent_1% – page's parent up one level

%page_parent_2% – page's parent up two levels

%page_parent_2% – page's parent up three levels

Admin

WordPress Professional

Raleigh, NC

posts 442

3:46 pm October 9, 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

brian7997

posts 1

11:40 am April 13, 2010

Yes, I second this – a parent page macro would be great for us lazy folks.

chefben said:

For sites that are using Wordpress as a CMS, adding the macro to pull in the page's parent for 3 or more levels deep would be a great feature.
%page_parent_1% – page's parent up one level
%page_parent_2% – page's parent up two levels
%page_parent_2% – page's parent up three levels


New Member

joewatts

posts 1

6:26 am June 22, 2010

Hi I added %page_parent% myself

In the file aioseop.class.php just find the following code:

$new_title = str_replace('%page_title%', $title, $new_title);

and just below it add this line

$new_title = str_replace('%page_parent%', get_the_title($post->post_parent), $new_title);

Only works for 1 level but thats all I needed

Shouldn't be hard to figure out how to do it for several levels

New Member

shutterdown

posts 1

2:51 am February 10, 2011

Post Awaiting Approval by Forum Administrator


About the WordPress Developer Forum

Forum Timezone: America/New_York

Most Users Ever Online: 205

Currently Online:
19 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