Would love to pull ACF field into title | Page 2 | Feature Requests - All in One SEO Pack Pro | Support | Semper Plugins

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Would love to pull ACF field into title
May 23, 2014
3:13 pm
Avatar
Peter Baylies
Admin
Forum Posts: 578
Member Since:
October 16, 2011
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

May 23, 2014
5:07 pm
Avatar
Kyler Boudreau
Member
Guests
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

NICE.

May 23, 2014
9:26 pm
Avatar
Kyler Boudreau
Member
Guests
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

One last question I think – I’m trying to pull in the post title for part of the description with the code above, and I can’t figure out a format it likes.

I’ve tried %post_title% %title% and %the_title%, but it’s not accessing the title.

The custom fields all pull in fine.

May 29, 2014
3:51 pm
Avatar
Peter Baylies
Admin
Forum Posts: 578
Member Since:
October 16, 2011
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

July 16, 2014
12:40 am
Avatar
Kyler Boudreau
Member
Guests
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

Peter, that code (with the double underscores) isn’t working for my meta_description in my functions.php file. When I view source on the page, it’s just showing up as the code, and not pulling in the title.

July 16, 2014
10:10 am
Avatar
Peter Baylies
Admin
Forum Posts: 578
Member Since:
October 16, 2011
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

July 16, 2014
12:45 pm
Avatar
Kyler Boudreau
Member
Guests
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

Sorry man, I was unclear. I’m trying to pull the page title into the meta description automatically. Here’s the code I’m using in functions.php:

(The one in bold below is the one not working. The others all work fine.)

add_filter( ‘aioseop_title’, ‘sfwd_acf_fields’ );
add_filter( ‘aioseop_description’, ‘sfwd_acf_fields’ );
add_filter( ‘aiosp_opengraph_meta’, ‘sfwd_acf_fields’ );

add_filter( ‘aioseop_description’, ‘sfwd_default_description’, 1 );

function sfwd_default_description( $desc ) {
if ( is_singular( ‘heating-air’ ) ) {
if ( empty( $desc ) ) $desc = “We’re a %cf_focus_city% %cf_snippet_link_name% offering the %cf_brand% %cf__aioseop_title%, along with other comfort solutions for the greater %cf_focus_city%, NC area.”;
}
return $desc;
}

July 16, 2014
12:56 pm
Avatar
Peter Baylies
Admin
Forum Posts: 578
Member Since:
October 16, 2011
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

July 16, 2014
2:08 pm
Avatar
Kyler Boudreau
Member
Guests
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

Okay, now I get it. 

I’m just wanting to pull in the WordPress post/page title. Can I do that?

July 16, 2014
2:25 pm
Avatar
Peter Baylies
Admin
Forum Posts: 578
Member Since:
October 16, 2011
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

July 16, 2014
5:34 pm
Avatar
Kyler Boudreau
Member
Guests
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

You’re right, I missed it. For anyone else needing this, here’s the code from Peter:

add_filter( 'aioseop_description', 'sfwd_replace_title', 1 );

function sfwd_replace_title( $description ) {
    global $aiosp;
    if ( !empty( $aiosp ) ) {
        $description = $aiosp->wp_title() . " " . $description;
    }
    return $description;
}

The above would go in your functions.php file.
Forum Timezone: America/New_York
Most Users Ever Online: 964
Currently Online:
23
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 36
Members: 23630
Moderators: 1
Admins: 7
Forum Stats:
Groups: 4
Forums: 28
Topics: 2137
Posts: 9303
Newest Members:
Steve Mortiboy
Moderators: semperplugins: 0
Administrators: Michael TorbertPeter BayliesSupport TeamSteve MortiboyMatthew RobinsonSteve Klasen, Arnaud: 262
[i]
[i]
Skip to toolbar