hy,
you should try to flush the rewrite rules. this is done by our plugin when mappings are saved too.
https://developer.wordpress.org/reference/functions/flush_rewrite_rules/
good luck!
Doesnt work.
I think It is because you have to filter in your code.
//yoast sitemaps
add_filter( ‘wpseo_xml_sitemap_post_url’, array($this, ‘replace_yoast_xml_sitemap_post_url’), 0, 2 );
add_filter( ‘wpseo_sitemap_entry’, array($this, ‘replace_yoast_sitemap_entry’), 10, 3 );
Is it possible for me to use them on my side? Like creating your class object to use it?
I tried this but doesnt work either
// Create the object to be sure the yoast filter is working
if( file_exists( ABSPATH . PLUGINDIR .’/multiple-domain-mapping-on-single-site/multidomainmapping.php’ ) ) {
require_once( ABSPATH . PLUGINDIR .’/multiple-domain-mapping-on-single-site/multidomainmapping.php’ );
$mappings = FALKE_MultipleDomainMapping::get_instance();
}
global $wp_rewrite;
//Flush the rules and tell it to write htaccess
$wp_rewrite->flush_rules( true );
flush_rewrite_rules();
hy,
i do not know how you integrated your solution with our plugin. i thought you would programmatically save your mappings into our plugin options 😉
since this is an advanced topic, i could help you on that but you would have to pay for the service.
one thing you can try is to search for our plugin options and have a look at how the mappings are stored in the wp_options table. if you can manage to fill that entry with your mappings programmatically, everything else (if our plugin is active) should work fine.
if you need help, please visit matthias-wagner.at and write me an email 🙂
matt