Theme Customization of Marketpress to match main site

I need to adjust the theme for MarketPress to match the standard layout for the site it is operating on. This is a multisite implementation of MarketPress on WP. I need to know what files or settings I change in order to adapt the layout of the MarketPress stores to appear like the main template adapted with the same header and footer. I also need to know how to customize the layout of the MarketPress piped in plugin. Please provide references including past posts or any references for customization of the layout of Wordpress to match the current theme of the main site. I appreciate it and would like to ensure other users of WPMU MarketPress also have a useful reference for development.

  • Christopher Rice

    Hey there --

    I'd recommend searching the forums using the wpmudev / google search feature for starters -- there's a ton of information here on customization pertaining to marketpress so it's a solid foundation to start with. I'm in the same boat as you and I've found it very helpful (I'm not savvy ... like, at all).

    You'll be hearing from one of the wpmudev staff members shortly, so I'd also suggest you include a few specs about your site so they, too, can start with a solid foundation.

    Cheers and good luck!

  • aristath

    Hello there @ncongo, I hope you're well today!

    Themeing instructions can be found on the marketpress/marketpress-includes/themes/Themeing_MarketPress.txt file.

    Let me just go ahead and copy-paste the contents of that file here to save some time:

    Themeing MarketPress
    -------------------------------------------------------------------------------

    There are two methods to create custom designs for MarketPress stores:

    Basic Styles:

    Basic styles are comprised of a css file and an optional images folder that is loaded
    and applied on store pages. To create a basic style:

    1. Create a css file in the /wp-content/marketpress-styles/ directory with your custom styles. It
    may be easiest to copy our default.css theme and modify it.
    2. Make sure to add the custom theme header with your theme's name at the top of the css file:
    /*
    MarketPress Style: CUSTOMNAME
    */
    Including this header will cause your custom theme to show in the dropdown on the
    Store Settings -> Presentation page so it may be selected.
    3. You can also optionally create a subdirectory for your css images in the /wp-content/marketpress-styles/ folder and
    link to images within it with relative urls like "image-folder/my-image.jpg".

    Advanced Themes:

    MarketPress uses custom post types to display it's products. This means that you can use
    the same WP theme templating system you are familiar with. We simply provide a customized
    subset of template functions so you don't have to worry about dealing with post meta. Template
    functions are fully documented and can be found in the /marketpress/marketpress-includes/template-functions.php file.

    E.g. to create a custom product page:

    1. Make a copy of the page.php template file in your theme directory and rename it mp_product.php

    2. mp_product.php must use the mp_* functions instead of the_content(), see template-functions.php for a list of functions relevant to products.

    MarketPress searches your current theme folder for template files specific to store pages. If
    a template file does not exist it loads the theme's page template instead. Just like WP, the
    plugin will search for templates in order of priority from top to bottom. Here are possible
    file names for store templates in order:

    Single Product Page
    mp_product-PRODUCTNAME.php
    mp_product-PRODUCTID.php
    mp_product.php

    Store Page
    mp_store.php

    Cart/Checkout Page
    mp_cart.php

    Order Status Page
    mp_orderstatus.php

    Product List Page
    mp_productlist.php

    Product Category List Page
    mp_category-CATEGORYSLUG.php
    mp_category-CATEGORYID.php
    mp_category.php
    mp_taxonomy.php
    mp_productlist.php

    Product Tag List Page
    mp_tag-TAGSLUG.php
    mp_tag-TAGID.php
    mp_tag.php
    mp_taxonomy.php
    mp_productlist.php

    --------------------------------------------------
    Global Listings - Will only work on main site/blog
    --------------------------------------------------
    Product List Page
    mp_global_products.php
    mp_productlist.php

    Product Category List Page
    mp_global_category-CATEGORYSLUG.php
    mp_global_category.php
    mp_global_category_list.php

    Product Tag List Page
    mp_global_tag-TAGSLUG.php
    mp_global_tag.php
    mp_global_tag_list.php

    I hope that helps!

    I am marking this issue as resolved.
    In case you need any further instructions and/or clarifications, don't hesitate to reopen this issue and post an update on your current status.

    Cheers,
    Ari.

  • aristath

    In my experience MarketPress will work out-of-the-box with most themes. The amount of customization needed is usually no more than 10 lines of css... The above custom templates etc are only used if you want to really customize your template files etc.

    If for example you download the FrameMarket theme and take a look at it's GridMarket child theme, you'll see that template files are really easy!
    The single products template looks like this:

    <?php // custom template for product single view
    get_header();
    ?>
    	<div id="content">
    					<h1 class="post-title"><?php the_title(); ?></h1>
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    				<div class="product-photo"><?php mp_product_image(true, 'single', null); ?></div>
    					<div class="product-details">
    				<div class="content-box">
    					<?php the_content(); ?>
    				</div>
    				<?php echo framemarket_product_meta(); ?>
    			</div>
    				<?php endwhile; else: ?>
    					<p><?php _e( 'Sorry, no posts matched your criteria.', 'framemarket' ) ?></p>
    				<?php endif; ?>
    		<?php comments_template( '', true ); ?>
    	</div>
    <?php get_sidebar(); ?>
    <?php get_footer() ?>

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.