update_post_meta($post_id, '_aioseop_description', $meta_description);
update_post_meta($post_id, '_aioseop_keywords', $meta_keywords);
I don’t know if I’m using the correct constants (_aioseop_description and _aioseop_keywords) or not, but I can’t insert what I need into AIOSEO, nor do I have any kind of error.
I would appreciate any help on this, and I’m attaching my full code, just in case.
// Extract the title
if (preg_match('/<title>(.*?)<\/title>/i', $page_content, $matches)) {
$page_title = $matches[1];
error_log('Page title found: ' . $page_title);
} else {
error_log('Page title not found.');
}
// Extract meta description
if (preg_match('/<meta name="description" content="([^"]*)"/i', $page_content, $matches)) {
$meta_description = $matches[1];
update_post_meta($post_id, '_aioseop_description', $meta_description);
error_log('Meta description updated: ' . $meta_description);
} else {
error_log('Meta description not found.');
}
// Extract meta keywords (if available)
if (preg_match('/<meta name="keywords" content="([^"]*)"/i', $page_content, $matches)) {
$meta_keywords = $matches[1];
update_post_meta($post_id, '_aioseop_keywords', $meta_keywords);
error_log('Meta keywords updated: ' . $meta_keywords);
} else {
error_log('Meta keywords not found.');
}
$post = array(
'ID' => $post_id,
'post_title' => $page_title,
);
wp_update_post($post);
]]>Can I use this plugin alongside Yoast SEO or all-in-one-seo plugin? Will it cause any issues?
]]>I started working on site optimization once again and google lighthouse keeps telling me my pages don’t have a meta description. I researched what meta is and noticed I don’t have a custom html file with meta data.
When I open page source, it looks like Autoptimize did a lot of work for my site SEO. I’m curious if anyone of you has a custom meta html while using Autoptimize, and if so, how did it affect Autoptimize?
I am not sure whether Autoptimize does anything with meta descriptions, titles and keywords, so if I were to make a html file with just the meta details, would it interfere with this plugin in any shape or form?
Thanks in advance
]]>We are using this All in One SEO Plugin from couple of years, Presently we are facing the issue about while we are uploading the product and attaching meta description and keywords. all the content is showing seoquake tools. next day all the meta description and meta keywords vanished for every product and every category.
we are asking our developer team about this issue, they are simplying saying about this plugin is free trial version, so problems will occur.
IS THIS TRUE.
Please clarify
We are awaiting for your swift reply.
Thanks & Regards:
K.Venugopal
I have added keywords in the Focus keyphrase section, but when I see the page form view source there are titles and descriptions is visible but the keyword is not visible, can you help me with that?
]]>