Skip to content

Store Layouts

The addon offers two layouts for the WCFM single-store page (the public page for one vendor’s shop). You choose the layout once, and it applies to every vendor store on the site.

  • Layout 1 - the WCFM Marketplace default store template, styled for Reign. This is the default when the setting is unset.
  • Layout 2 - the addon’s own store template (templates/reign-wcfm-store-layout2.php), which replaces WCFM’s store/wcfmmp-view-store.php.
  1. Open Reign Options > WCFM Marketplace.
  2. Select the Single Store sub-tab.
  3. Set Single Store Layout to Layout 1 or Layout 2.
  4. Save.

The setting is stored as reign_wcfm_store_layout inside the shared theme option. See Configure settings.

When Layout 2 is selected, the addon does two things:

  1. Template swap. On the wcfm_locate_template filter, it points WCFM’s store/wcfmmp-view-store.php request at the addon’s Layout 2 template.
  2. Wrapper class. On the wcfm_store_wrapper_class filter, it adds a layout_two class to the store wrapper element (#wcfmmp-store), which the addon’s CSS targets. When Layout 1 is active, the class is layout_one.

The Layout 2 template renders the full WCFM store: banner (image, slider, or video), the vendor header (avatar, rating, address, phone, email, follow, enquiry, social), the store tab strip, and the products or the selected sub-tab (About, Policies, Reviews, Followers, Followings, Articles). It keeps calling the same WCFM template hooks the original store template fires, so WCFM add-on features that hook into the store page (enquiry, follow, badges) continue to appear.

Layout 2 depends on WCFM Marketplace being active. The template bails out cleanly (renders nothing extra) if the vendor store object or the WCFM helper functions are not available, so it cannot fatal when WCFM is inactive.