How do I make the selected layout display for all MarketPress pages?

I've set up a WordPress site and installed MarketPress. It works fine overall and the /store/ page is correctly displaying my selected template/layout.

However, all subpages such as /store/products, /store/cart, /store/categories etc. are not using the template/layout that I chose, but rather some default. Maybe this is because they are "virtual" pages that MP itself are handling.

Question is: How do I tell MarketPress to use my chosen template/layout for all of MarketPress´ pages?

I've tried a solution that I found, but it doesn't work for me. It could be a solution connected to some other product or plugin that the author has but not me. See link below:

http://buildersnippets.com/how-to-assign-a-layout-to-any-marketpress-page-in-builder/

I'm aware of the MarketPress Template Hierarchy and that I can bypass the admin interface by copying my chosen template (in the drop-down) code into five other php files, but that feels really unflexible and doesn't honor the drop-down select box in MarketPress' settings interface... I feel that such a hack would counterfeit the purpose of buying a pre-coded eCommerce plugin in the first place? And it would also make life hard for editors, of course.

  • Jack Kitterhing

    Hi there @Eric Lindgren,

    Thanks for the additional information, much appreciated.

    I've done some checks here and we have a couple of options.

    Create a template structure for the MarketPress template hirearchy https://premium.wpmudev.org/blog/the-easy-guide-to-theming-marketpress/

    Or and this may be your preferred option, on the content that we can output with shortcodes, use shortcodes and then we can set the template, on pages that won't work with, we can use some custom css to remove elements you don't want.

    Would that work for you at all? I'm here to help :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • Eric Lindgren

    If I understand you correctly, MarketPress doesn't honor the, by editor, chosen layout when generating pages. And there is no easier fix than to start coding?

    It sounds like a major flaw - why would there be an editorial way of chosing a layout in the first place if it isn't being used (except for on one of the pages)... is this on your roadmap? Overall I'm happy with the design of the virtual pages, besides how the core handle the choosing of the page template (sidebars etc.).

    Anyway, besides the disappointment, could you write or point me to a step-by-step guide on a workaround? It would be most appreciated, thanks. A reasonable solution would be something like what I propose in my first post, which I think other users would be thankful for also.

  • Jack Kitterhing

    Hi there @Eric Lindgren,

    Hope you're well today :slight_smile:

    That is correct, the main issue being that these are virtual pages, so if you edit the page template it doesn't apply, as virtual pages can't be edited.

    We are looking at changing these to proper pages in a future version, like how BuddyPress does it :slight_smile:

    Anyway, besides the disappointment, could you write or point me to a step-by-step guide on a workaround? It would be most appreciated, thanks. A reasonable solution would be something like what I propose in my first post, which I think other users would be thankful for also.

    I'd be more than happy to try and help here :slight_smile: In this case, you don't want to create the custom .php template files for the hirearchy correct? No worries if not, I can find another workaround here :slight_smile:

    Please advise.

    Thank you!

    Kind Regards
    Jack.

  • Eric Lindgren

    Dear Jack,

    I'm fine, hope you as well!

    I hope this is a prioritised topic for the developers. I would more than nothing, see these changes in upcoming updates of MP.

    You have understood me correctly. In some way it must be possible to communicate with these virtual pages, with no major intervention, of applying another page template besides the default. In my case this would be a much better solution for different reasons. I'm looking for a generic solution here.

    If you could find a solution like that, I would be very thankful!

    Best Regards
    Eric Lindgren

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.