Need to auto fill title and description for social meta | 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
Need to auto fill title and description for social meta
December 20, 2014
4:29 pm
Avatar
Kyler Boudreau
Member
AIOSEOP
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

Peter and Steve gave me a way to add code to my functions.php file to auto populate my titles and pull in ACF fields.

It works great. However, I need it to do the same for the social meta info – could someone give me the code for that too? Thanks a million!

Here’s what I’m using right now (this is addressing two of my CPTs):

global $aiosp;

if ( !empty( $aiosp ) ) {
add_filter( ‘aioseop_description’, Array( $aiosp, ‘apply_cf_fields’ ) );
add_filter( ‘aioseop_description’, ‘sfwd_default_description’, 1 );
function sfwd_default_description( $desc ) {
if ( is_singular( ‘ogs’ ) ) {
if ( empty( $desc ) ) $desc = “Looking for products in %cf_city%, %cf_state%?”;
} else if ( is_singular( ‘juniors’ ) ) {
if ( empty( $desc ) ) $desc = “Looking for products in %cf_city%, %cf_state%?”;
}
return $desc;
}
}

December 22, 2014
7:16 pm
Avatar
Peter Baylies
Admin
Moderators

Members
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 **

Forum Timezone: America/New_York

Most Users Ever Online: 964

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 14

Members: 18095

Moderators: 1

Admins: 8

Forum Stats:

Groups: 4

Forums: 28

Topics: 1742

Posts: 7325

Newest Members:

A David Medina García

Moderators: Dawa Liu

Administrators: Michael TorbertPeter BayliesSupport TeamSteve MortiboyMatthew RobinsonSteve KlasenArnaud BroesAsh R

[i]
[i]
Skip to toolbar