Another way to access Advanced Custom Fields within AIOSEO | 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
Another way to access Advanced Custom Fields within AIOSEO
January 27, 2015
3:22 pm
Avatar
Kyler Boudreau
Member
AIOSEOP
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

Got another ACF request – would love this feature if it’s not complicated for you guys.

Basically I build sites for a niche industry, and many of the products pages are identical to some degree across the sites.

I build the pages pulling Advanced Custom Fields data from one page on the site, and that makes the products pages unique to them — at least as much as is needed.

Let me explain the above so we’re on the same page:

1. I create a page in Wordpress called General Settings.

2. I create an ACF field group with the desired fields I want to show on that page, and store in the database. The fields are things like their company name, address, etc.

3. In my template files on the site, I am able to access those fields with something liike <?php the_field(‘business_name’,45); ?> where 45 is the page ID of my General Settings page. If I’m in TinyMCE on a post, I can access the fields with this: [acf field="business_name" post_id="45"].

So, my ultimate question is this: Is there any way for me to within the AIOSEO settings on a page, type in something to access the General Settings ACF data? If so, that would be a huge time saver for me.

January 27, 2015
6:05 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 **

January 28, 2015
2:38 pm
Avatar
Kyler Boudreau
Member
AIOSEOP
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

Peter,

Oh that’s cool — didn’t know about that.

So I see that works as indicated. My only problem: I usually like to type out the descriptions as opposed to a general page pull. And I know if this was just one site, I’d just custom type what I want it to show, but I’m trying to setup some pages for multiple sites, and there lies the issue.

Is there a way I could type a short code into the Description field for AIOSEO? I tried it just now, but it doesn’t interpret it.

Thanks man.

January 28, 2015
5:05 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 **

April 15, 2016
9:33 pm
Avatar
Kyler Boudreau
Member
AIOSEOP
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

Hey Peter – I’m insanely just now getting back to this stuff.

Could you expound further? A couple years ago you gave me some code for the functions.php file that allowed me to auto populate title and description info on a certain custom post type, while also pulling in ACF fields using something like the below. I’m trying this again on a new site, but it’s not working for me for some reason.

Would you mind giving me the code to auto generate title and description for a CPT called ‘og-profile’? If I enter in info in the actual AIOSEO fields on the post, that will take priority, but if they’re left blank I’d like to auto fill with some of the post’s content.

Thanks man!

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 essential oils in %cf_city%, %cf_state%? Check out this Certified Oily Guru specialized in essential oils from Young Living!”;
} else if ( is_singular( ‘juniors’ ) ) {
if ( empty( $desc ) ) $desc = “Looking for essential oils in %cf_city%, %cf_state%? Check out this Oily Guru who offers essential oils from Young Living!”;
}
return $desc;
}
}

April 16, 2016
4:40 pm
Avatar
Steve Mortiboy
Admin
Forum Posts: 1688
Member Since:
January 5, 2012
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 **

June 7, 2016
12:46 pm
Avatar
Kyler Boudreau
Member
AIOSEOP
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

Steve,

That’s not the feature I’m after though. Example:

I have sales reps that have profiles. The profiles are custom post types with ACF fields. One of the ACF fields is called ‘first_name’ and another is ‘city.’ I want to have AIOSEO create a description for every profile that says:

first_name is a distributor located in city.

In an earlier version of AIOSEO you guys gave me code for the functions.php file that made this work. That code isn’t working for me anymore.

Thanks so much.

June 7, 2016
5:38 pm
Avatar
Michael Torbert
Admin
Forum Posts: 299
Member Since:
October 13, 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 **

June 14, 2016
1:47 am
Avatar
Kyler Boudreau
Member
AIOSEOP
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

Michael – an honor! Thanks for responding.

I added the code to my functions.php, but when I did and viewed source, the meta description just said “post content.” Anything else I could check?

Also, I’d love to generate the title too in the same way.

Much appreciated!

June 14, 2016
8:01 am
Avatar
Michael Torbert
Admin
Forum Posts: 299
Member Since:
October 13, 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 **

June 14, 2016
8:51 pm
Avatar
Kyler Boudreau
Member
AIOSEOP
Forum Posts: 47
Member Since:
April 30, 2014
sp_UserOfflineSmall Offline

It literally says post content.

Forum Timezone: America/New_York

Most Users Ever Online: 964

Currently Online:
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 14

Members: 18059

Moderators: 1

Admins: 8

Forum Stats:

Groups: 4

Forums: 28

Topics: 1738

Posts: 7300

Newest Members:

DOVEL SARL

Moderators: Dawa Liu

Administrators: Michael TorbertPeter BayliesSupport TeamSteve MortiboyMatthew RobinsonSteve KlasenArnaud BroesAsh R

[i]
[i]
Skip to toolbar