How can I edit the index page created for each new site?

Focus: GridMarket MarketPress multisite.

I am building a series of pages as a "new store-template", and hope to use new blog templates plugin to set these page up as default for each new site I create on my network.

I just realized I cannot customize the index page or even edit it. Every time someone clicks a store to go to, the index page pops up with a product grid - fine, but that will not be the "store template" homepage I prefer you see!

Maybe I am wrong, but I cannot edit that index page or wrap it into my "new store template".

a) Is there a way to add a "store header" graphic at the top of the index page, at the very least?

b) Is there a way to replace the default index page for each new site - with my new homepage template?

Thank you.

  • DavidM

    Hi MoniQ,

    Would that store header be a static image? I mean, is it supposed to change based on the respective site?

    Also, are you already using custom page templates?

    I couldn't quite tell for sure given your description. But if not, I think that might be what's needed here.

    Also, are you currently using GridMarket directly or are you using a customized child theme?

    If you're using custom page templates, that will likely answer the child theme question. But I just want to be sure I understand your setup thus far.

  • MoniQ

    Hello DavidM. I am using GridMarket theme and its custom.css area.

    For each new site, can you tell me if the store index or homepage should be editable? Did I break something, or is this a default page with a product grid that I am not suppose to be able to edit?

    Footer partly solved. GridMarket has a footer override, so I added in global links. I hope new blog templates can copy that over for each new site. I also tried to add a widget with

    [mp_global_categories_list limit="20" order_by="name" order="ASC" show_count="0" include="categories"]
    , but it does not display the global products. But, maybe it will display once I add products.

    Header pending. Need to find way to make network header default across all stores. (SEO: Just want to add default favicon.) Is it possible to add <img src="" title="Domain Name" alt="Domain Name"/> in the right place in header.php. If done right, would that override or replace all new site custom logo headers?

    Yes. Each new store will have their own page header to brand their pages. I will have to replace the graphic header on each page manually. Trying to find the best way to do that.

    I wish I could build custom page templates! I created a blank template, made it appear in site admin/page attributes pull-down menu, but do not know how to place my html layout within the php script to outline the page:

    Template Name: Blank2013 Template
    <?php get_header(); ?>
    <div id="content">
    	<?php get_template_part( 'content', 'page' );?>
    	<div class="clear"></div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    For example, let's say I create a set of 4 tabs on the lower half of the page to update information below it, but the top half will have consistent information per page.

    Hope this makes sense!
    Thank you.

  • DavidM

    Hi MoniQ,

    Just to start with the first few items, GridMarket defaults to having a grid display for the front-page. You can change that behavior at Settings > Reading. You can specify a 'static page' and then customize that page. I've attached a screenshot to illustrate.

    As it turns out, that could potentially handle your initial customization request. New Blog Templates will maintain that setting in templates created with it.

    Does that perhaps answer that question?

    As for the global categories shortcode, yep you'll need to have some products added before it shows anything. If you'd like to create a test product and let me know how that works, I'll be happy to assist further with that.

    Could you please verify that above question though? We can proceed with your further query with that sorted.


  • MoniQ

    1) Applying the primary site header "globally" across the network, is my number one issue to solve. If you could help me with that - great!

    Would like to insert global favicon - I forget how.

    2) I also need help to understand how to work with GridMarket's 5 footer columns:
    I left all footers empty. In Footer1 or column 1 I put the global category list, which is displaying fine. I want categories to list across the width of the page through all five columns, as global categories will increase in number overtime. I have a feeling the list won't wrap to the second column, third, fourth and fifth column spaces, but instead will list only in column one on the left, and go straight down the page. Just wondering how I might address this. I still need to test by adding more categories.

    Index page is editable. Building layout for store-template.

    Footer widget global-links are fine.

    So far so good. Sorry for the confusion above.


  • DavidM

    Hi MoniQ,

    Could you please clarify, do you want a site header that is the same on every single site by default?

    If so, probably the easiest way would be to setup the theme on one of the sites on your network, select a header image there, then use New Blog Templates to copy that site. Then you can use that template as the default template for new sites. The theme options should then carry over to each site after that.

    Have you tried that by any chance?

    Also, did you want for users to be unable to change that header? For that matter, did you want users to be unable to change any of the theme options?

    A global favicon should be simple. In your GridMarket folder you'll see a header.php file. You can open that up and right after the <head> tag, insert the following:

    <link rel="shortcut icon" type="image/png" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.png" />

    You can then copy your favicon file (assuming it's a PNG file) right into the GridMarket folder.

    Hopefully we can get these couple issues sorted quickly then look into the others.


  • DavidM

    @MoniQ, I just wanted to quickly clarify that since we're doing work in your header.php file for the favicon, it should be relatively easy to make adjustments to the header for your header image request.

    I just wanted to be sure that you wanted something hard-coded in the theme file for it, rather than having an option that users could change. Or even having limited options.

    I'll gladly provide code to that effect. Just let me know and I'll see how I can help.


  • MoniQ

    Thanks DavidM.

    Yes, header and footer are to be the same on every new site and page in my network.

    1) In the store template, I placed my logo.png for header, but I don't know how to point the header web-link to the primary site, instead of to the local site.

    I have not used new blog templates yet, but will, to copy this default store template soon.

    I will work on the favicon today. Thanks.

    I look forward to hammering out the footer global category list layout. (I will be adding Facebook and Twitter links in Footer5 column soon.)

    I have store inventory ready to setup my first test store. Will be nice to have more categories and products to test everything with.

    Thank you!

  • MoniQ

    DavidM, changing or adding code in the header.php, to ensure no one can change the header logo or web-link sounds perfect! Will I be able to update the logo later on, using the super admin theme options, or will I need to replace logo.png manually after this?

    Somewhere along the way, either the server, browser or ? did not update the favicon graphic, until I changed the name to favicon1.ico. Works!

    Thank you!

  • DavidM

    Hi MoniQ,

    That's correct, with the header logo hard-coded in the theme, it wouldn't be able to be changed through your admin area.

    To alter the header in that way, in that header.php file, you can replace all of lines 104 - 130 with something like the following:

    <div id="site-logo"><a href=""><?php echo "Network name"; ?></a></div>

    For that reference, you'll want to include the url of the header image you wish to use.

    And where it reads "Network name" you can alter that to be the name of your site.

    How would that work for you?

  • MoniQ

    DavidM, things are looking great.

    Global Header done. Favicon done.
    In header.php, took out lines 105-135, and replaced with:
    <div id="site-logo">

    <a href=""><img class="image/png" alt="Welcome to ArtCommons!" src="" width="980" height="50" /><?php echo 'ArtCommons'; ?></a>

    Global Footer: want to add consistent footer for all new sites using "new blog templates" (different from the main site). Don't want site admins to change it.
    Added twitter and facebook links to footer five (left end of footer).
    Added global category short code to footer one, which lists them down the column.
    How can I list categories across footer1-4, and then have them fill in as categories increase overtime (or define max# of categories to display).

    Thank you!

  • DavidM

    Hi MoniQ,

    If you don't want site admins to change something in the theme options, you'll likely be best off doing that in the theme file itself, similar to the favicon and header graphic.

    Using New Blog Templates for those bottom widgets will still allow site admins to change the widgets.

    I can assist with the changes in theme files. But probably a simpler option would be to hide the Appearance > Widgets menus of your admin dashboard for site admins.

    Easiest way to do that would be to use Admin Menu Editor (Network Activiated for multisite use).

    Would something like that work for you?

    PS I mention that plugin as an option because you might want to hide other admin menu items from site admins. This plugin makes it easy instead of making constant code changes.


  • MoniQ

    DavidM, thanks. I like the idea of hiding admin aspects from members.
    Can I do this later on after more shops are added and tested? Or is it better to install all plugins right away to test them out? What is good admin practice?

    Just wondering if there is a way to get my footer columns to work with "global category list" like this:
    footer 2) start list, 4-down, and then wrap to next column
    footer 3) list 4-down, then wrap to next column
    footer 4) list 4-down.

    And if I need to expand to 5-down later on...

    Is this about editing short codes? How?

  • DavidM

    Hi MoniQ,

    Hope you're doing well today!

    You could always install the menu plugin, or even other plugins, later down the road. That's always an option. It's usually best to establish your preferred structure early on, to get yourself accustomed to a particular work-flow. It's totally up to you though.

    That said, what you're requesting for breaking up the global category list into columns could potentially be done with the shortcode as you mentioned.

    What you'll need to do though is first allow shortcodes to work in the standard Text Widget. For that you could insert the following in line 2 of the theme's functions.php file:
    add_filter('widget_text', 'do_shortcode');

    Alternatively you could just install the following plugin:

    With that, you'll be able to use a Text Widget with a shortcode in each footer widget column like so:

    Footer one
    [mp_list_global_products page='1' per_page='4']
    Footer two
    [mp_list_global_products page='2' per_page='4']
    Footer three
    [mp_list_global_products page='3' per_page='4']
    Footer four
    [mp_list_global_products page='4' per_page='4']
    Footer five
    [mp_list_global_products page='5' per_page='4']

    You'll probably need to adjust the CSS styling to make it all fit, but that should roughly do it. Mind you, it could be done directly through the theme's footer.php instead, but doing it through the theme's existing widget section makes it easy to change later.

    How would that work for you?


  • MoniQ

    Hello DavidM, thanks.

    Shortcodes already work in text-widgets. So I assumed I don't need to add the code in functions.php, but if I am wrong please let me know.

    Added to footers:
    [mp_global_categories_list paginate="true" page="1" per_page="4" order_by="name" order="ASC" show_count="0" include="categories"]

    Result is the first 3 categories list over again per column. Only 3 categories are activated right now, could that be why they repeat? There must be something I am doing wrong to define pages. I removed "paginate=true" as you have above, and I get the same result.


  • DavidM

    Hi MoniQ,

    I realized I should have clarified earlier, but there are two options I used in the shortcode, as explained below:

    [mp_list_global_products page='1' per_page='4']

    per_page: this option tells the shortcode to display 4 categories "per page"
    page: this option tells the shortcode "which" page to display

    When per_page='4' it displays 4 categories "per page".

    When page='1' it will display the first 4 categories (the first "page" of 4 categories).

    When page='2' it will display the next 4 categories (the second "page" of 4 categories).

    Does that make sense?

    Maybe more simply, the shortcode is displaying the categories in pages of 4 categories each. The first one is displaying the first page of 4. The second one is displaying the second page of 4. And so on.

    If there aren't enough categories to fill them all, some categories will be repeated, as you're likely seeing.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.