MarketPlace Main Blog Change

Hi there,

Can I change the location of the main store blog?

I found this line in marketpress-ms.php on line 125

main_blog' => 1,

Is this where the change takes place?



  • Mason
    • DEV MAN’s Sidekick

    Hiya Paul,

    I’m actually not sure how to make MarketPress behave as if a different site is the main site on WordPress. If anything, I think you’d have to configure WordPress Multi-site to view one of the other sites as the “main” one – and even then I’m not sure.

    Are you just wanting your global product listings to be on a separate domain from the domain of your WordPress site? There may be other, easier solutions to do this.

    Anybody else have an idea on this?


  • member1
    • The Incredible Code Injector

    Thanks for your replies.

    My strong preference is to have the ‘global’ store not on the root blog. ie it is just one function of our network.

    I was hoping it would be a simlilar wp-config change such as how the root blog for buddypress can be modified.

    @aaron – can you please explain the workaround you are describing in more detail? thanks

  • member1
    • The Incredible Code Injector

    thanks Aaron.

    in the short term, if I begin building stores and the “marketplace” page resides at root blog level, can this be changed to another blog without too much disruption once the ‘define’ is added in later version?

    Basically, can I begin now, or should I wait before going too far?



  • member1
    • The Incredible Code Injector

    FYI: added define code to wp-config.php and its working.

    only issue though is that the categories and tags pages on main blog are pulling up this error.

    Categories Page

    Fatal error: Using $this when not in object context in /home/xxxxxx/public_html/wp-content/plugins/marketpress/marketpress-includes/marketpress-ms.php on line 1055

    this line: $link = get_home_url( $this->main_site_id(), $settings['slugs']['marketplace'] . '/' . $settings['slugs']['categories'] . '/' . $tag['slug'] . '/' );

    Tags Page

    Fatal error: Using $this when not in object context in /home/xxxxxx/public_html/wp-content/plugins/marketpress/marketpress-includes/marketpress-ms.php on line 1098

    this line: $tag['link'] = get_home_url( $this->main_site_id(), $settings['slugs']['marketplace'] . '/' . $settings['slugs']['categories'] . '/' . $tag['slug'] . '/' );

    they both seem to be referencing ‘main_site_id’

    any suggestions?

    thanks for your help


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.