Which hook to use when writing custom SEO title and description to DB | General - All in One SEO Pack Pro Forum | 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
Which hook to use when writing custom SEO title and description to DB
October 30, 2017
1:08 pm
Avatar
Verena Zolles
Member
Members

AIOSEOP
Forum Posts: 3
Member Since:
September 15, 2016
sp_UserOfflineSmall Offline

We noticed you offer 2 filters to change the SEO title and description in the frontend, but we would like to customise what All in One writes to the DB posts_meta table.

This much we’ve figured out:

function vtp_update_seo( $post_id, $post, $update ) {

$description = get_post_meta( $post_id, ‘_aioseop_description’, true );
$description = get_post_meta( $post_id, ‘_aioseop_description’, true );
if ( empty( $description ) ) {
    add_post_meta($post_id, ‘_aioseop_description’, $vtp_seo_description);
}else{
    update_post_meta($post_id, ‘_aioseop_description’, $vtp_seo_description); 
}

}
add_action(‘save_post_product’, ‘vtp_update_seo’, 10, 3);

But ‘save_post_product’ isn’t working. We figure All in One is somewhere overwriting our changes…

Thanks in advance for any help!

October 30, 2017
2:44 pm
Avatar
Michael Torbert
Admin
Forum Posts: 301
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 **

October 31, 2017
2:30 am
Avatar
Verena Zolles
Member
Members

AIOSEOP
Forum Posts: 3
Member Since:
September 15, 2016
sp_UserOfflineSmall Offline

Hi Michael,

We already tried changing the priority, but no difference.

Any other suggestions? Another hook maybe?

Thanks, R

October 31, 2017
8:54 am
Avatar
Michael Torbert
Admin
Forum Posts: 301
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 **

October 31, 2017
10:35 am
Avatar
Verena Zolles
Member
Members

AIOSEOP
Forum Posts: 3
Member Since:
September 15, 2016
sp_UserOfflineSmall Offline

Thanks Michael.

The ‘save_post_product’ hook was the problem. Works fine with ‘save_post’ and an additional conditional statement to check the cpt.

October 31, 2017
10:59 am
Avatar
Michael Torbert
Admin
Forum Posts: 301
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 **

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