wordpress

Wordpress home url wrong only in 1 place


I used all-in-one WP migration tool to backup and move my site to another domain. After that I changed the home and siteurl from settings. Everything works fine, except the logo in my homepage header still points to old url. All other links point to new domain.

I don't get what's the problem. I tried to grep the www root to find any references to old domain, no matches. I used wp-cli to check siteurl and home from database wp_options table and they are correct. I loaded the page in incognito with cache disabled. It has been a few weeks, so I think any caches should be cleaned anyways.

Any ideas?

[UPDATE]

I found out that the old domain is ghosting around in some db option_values related to "quadmenu" plugin. I removed it, and reinstalled. DB stays the same, so no luck. Then I followed the code path:

<?php

// logo.php
<a class="quadmenu-navbar-brand img" href="<?php echo esc_url( $link );?>">...</a>

// inherit.php
quadmenu_get_template(
    'logo.php',
    array(
        'url'  => isset( $args->navbar_logo['url'] ) ? $args->navbar_logo['url'] : false,
        'link' => $args->navbar_logo_link,
    )
);
        
// class-configuration.php
$defaults['navbar_logo_link'] = quadmenu_get_translated_home_url( '/');


// class-functions.php
function quadmenu_get_translated_home_url( $param ) {
    $home_url = home_url();
    if ( function_exists( 'pll_home_url' ) ) {
        $home_url = pll_home_url( $param );
    }
    if ( function_exists( 'wpml_get_home_url' ) ) {
        $home_url = wpml_get_home_url( $param );
    }
    return $home_url;
}
?>

So looks like it's just calling home_url() which I think is built into WP? If i echo home_url() in the same file to the page, it outputs the correct url. I'm lost. pll_home_url and wpml_get_home_url are undefined.


Solution

  • Answering this in case someone has the specific problem of Quadmenu + wrong logo url:

    Turns out Quadmenu has it's own setting for logo url, separate from WP. It seems to update when importing a site, but not when you change the site url after importing.

    I found this setting at quadmenu->options->default theme->menu and changed it.