Choosing the shop

I don’t know if this is a foolish question or not but is there a widget for choosing the shop dropdown box in gridmarket that could be used for other themes?

  • Mason
    • DEV MAN’s Sidekick

    Hiya sharena.conte,

    Not a foolish question at all! That’s a pretty handy feature, eh? :slight_smile:

    We don’t have a widget for it, but a shortcode or widget would be a nice addition to the plugin. I’ll mention that to the developers.

    We do have a function that allows you to do this though. It was built specifically for framemarket. Just add this to your theme wherever you have marketpress enabled in the theme:

    <?php framemarket_listall_shops(); ?>

    This function will only work if you have multisite and marketpress enabled. Dropping it into a theme without these conditions being met will lead you to the white screen of death! :slight_smile:

    So make sure those conditions are there or turn it into a conditional statement by following along how the gridmarket theme does this (look at header.php lines 54-74)

    Hope this helps!

  • Mason
    • DEV MAN’s Sidekick

    Hiya sharena.conte,

    I only meant to make sure you put it in a theme on a site where MarketPress is already activated. If you were to activate a theme with this function, and then disable the marketpress plugin, you’d get a blank white screen on the front end because this function relies on MarketPress.

    The location in your theme template would totally depend on where you want it to show up on the front end.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.