• Resolved leosolutions

    (@leosolutions)


    I’m using your plugin for a project at our business to handle stuffs.
    I’m handling programmatically the domain to be added to your plugin but the problem is the refresh Yoast SEO programmatically.
    I tried to find what you are doing but I can’t see it.
    Is it possible to call a function to generate sitemap with new informations?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author matthias.wagner

    (@matthiaswagner)

    hy,
    you should try to flush the rewrite rules. this is done by our plugin when mappings are saved too.

    https://developer.www.ads-software.com/reference/functions/flush_rewrite_rules/

    good luck!

    Thread Starter leosolutions

    (@leosolutions)

    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?

    Thread Starter leosolutions

    (@leosolutions)

    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();

    Plugin Author matthias.wagner

    (@matthiaswagner)

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Refresh yoast seo sitemap’ is closed to new replies.