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.

Please consider registering
guest

Log In

Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Page Title Format add Macros for Parent Pages
October 9, 2009
3:15 pm
chefben
New Member
Forum Posts: 1
Member Since:
October 9, 2009
Offline

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

October 9, 2009
3:46 pm
WordPress Professional
Admin
Forum Posts: 442
Member Since:
October 14, 2008
Offline

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
April 13, 2010
11:40 am
brian7997
New Member
Forum Posts: 1
Member Since:
April 13, 2010
Offline

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


June 22, 2010
6:26 am
joewatts
New Member
Forum Posts: 1
Member Since:
June 22, 2010
Offline

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

February 10, 2011
2:51 am
shutterdown
New Member
Forum Posts: 1
Member Since:
February 10, 2011
Offline
5
Awaiting Moderation

Forum Timezone: America/New_York

Most Users Ever Online: 205

Currently Online:
61 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

romiojuliat: 102

yaoming987: 50

jintuy: 50

miki1986: 33

newshow: 28

karen1234: 27

Member Stats:

Guest Posters: 0

Members: 6356

Moderators: 3

Admins: 4

Forum Stats:

Groups: 5

Forums: 23

Topics: 1546

Posts: 3450

Newest Members: carofern@cisco.com, pronto, jessie, pbaylies, ninaeast, freda

Moderators: davecashmore (2), aaron (5), tempadmin (0)

Administrators: WordPress Professional (442), hallsofmontezuma (202), onefinejay (10), stevemortiboy (4)