MarketPress Virtual Shop Pages and Permalinks

I’m trying to use get_permalink() and page specific dynamic sidebars with the MarketPress plugin pages.

From what I can see, the default MarketPress structure of /store/shopping-cart, /store/products/ etc. are virtual URLs and don’t trigger the above mentioned functions.

How does one interact with these virtual pages using standard WP functions, or is there an internal $mp variable that can be leveraged?

Please let me know; Thank you!

  • dSquared
    • Flash Drive

    To anyone interested;

    I was using the get_permalink() function with strpos() to check if the current page was part of the virtual store URLs and toggle a ‘store only’ menu. The following global returns a boolean that can be used to accomplish the same thing:

    global $mp
    if ($mp->is_shop_page){
    // On Shop Page
    else {
    // Not a Shop Page

    I used the following to get the post id of the store for the dynamic page specific sidebars. It will require you haven’t changed the default store page title.

    $page = get_page_by_title( 'Store' );
    $page_id = $page->ID;

    I hope this helps some one.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.