smedina0
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Hello @arnaudbroes
1. I have tested the code you share with the following steps:
$title = aioseo()->meta->metaData->getMetaData($post); // return "Page title #separator_sa #site_title"
2. Then use this variable in the following function:
aioseo()->tags->replaceTags( $title->title, $post->ID ); // return "Page title | Title of my site"
With these steps it works correctly for me.
Thank you so much.
Hi @arnaudbroes ! I used beta version but still give me same error. I’m not sure if exist difference on free and pro version in the beta plugin, but I use free version on my site.
@arnaudbroes I checked the source code and in the Network tab the request to sitemap.xml shows the following response: https://ibb.co/1rBBgy0
I have also tried adding the “lastModified” position in the “aioseo_sitemap_additional_pages” hook but still with the same error.
- This reply was modified 1 year, 2 months ago by smedina0.
@arnaudbroes I send the code. I tried to add pages with static data but it still gave me an error.
<?php add_filter('aioseo_sitemap_additional_pages', function ($pages) { $base_url = get_home_url(); $brands = unserialize(get_option('brands_data_seo', null)); $date = Date('Y-m-d H:i:s'); foreach ($brands as $brand) { $pages[] = [ 'loc' => $base_url . $brand['url'], 'lastmod' => $date, 'changefreq' => 'always', 'priority' => '1.0' ]; } return $pages; });
Viewing 4 replies - 1 through 4 (of 4 total)