Simple Market Theme Support

Hi,

I am relatively new to code and would really appreciate some guidance in how to make to following changes to the new simple market theme, on a multisite marketpress website.

1. How can I resize the header image?

2. Is it possible to use the header image as the site title (making it link to the home page as the current site title does now)?

3. I have added all categories etc to my navigation menu, however I cannot seem to adjust the text to stop there being a small gap on the right hand side of the menu bar, if I try and make the text of the menu options the right size it pushes the menu down and still leaves me with a messy gap :slight_frown:

  • Philip John
    • DEV MAN’s Apprentice

    Hiya!

    To resize the header you would need a child theme first of all. Details on that are here: http://codex.wordpress.org/Child_Themes

    Then, you'd need to use the in-built filters 'simplemarket_header_image_width' and 'simplemarket_header_image_height' to over-ride the height and width settings.

    You could turn the image into a link, yes. You'd need to add the link to header.php as part of your child theme.

    Can you post a screenshot of the gap please as I'm not sure what exactly where the issue might be?

    Thanks,
    Phil

  • Byronmarkets
    • Flash Drive

    Hi, I am still struggling with resizing the header. I have created a child theme and a child header.php I have added the following code to the child header.php however I still can't seem to get it to work. What am I doing wrong. Site is http://www.byronmarketsonline.com

    <?php

    if ( ! function_exists( 'simplemarket_setup' ) ):

    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'simplemarket_header_image_width', 1102 ) );
    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'simplemarket_header_image_height', 100 ) );
    }
    endif;
    ?>

    my site is http://www.byronmarketsonline.com/wp-admin/
    I have provided you with a log in to help me:

    also would love if you could advise me what code I need to use to make my menu items fit to the panel

  • Byronmarkets
    • Flash Drive

    I created limited functionality with this password. just so you can actually see the site. as I have construction block on it for general public, is there a better way to do this?

    I have placed this code in the child's function and removed from header.php and still does not work. :slight_frown:

  • Byronmarkets
    • Flash Drive

    I have figured it out, there seemed to be no way to do it without editing the css at the bottom of the parent theme.

    9.0 - IE 7 */
    .ie7 #header-image img{width:100%;height:100px;}
    Any suggestion on how to this into the child theme?

    I have also noticed that the default image to load in the wordpress is 1102px by 350px even though I have updated my header height to 100px, it will only accept the default size image and then stretches the image out. I am concerned that my multisite customers wont figure this out, is there anyway to fix this.

    Any suggestions?

  • Tammie
    • WordPress Wizard

    Ok first up you don't just add those lines to the child to get it to work. You would need to include the entire function ie; everything in it.

    We also would never suggest adding CSS to the parent and just adding CSS won't work either.

    Also it's called something different so very unsure why you are calling it that. Please use the latest vesion of the theme and this function in your child functions.php. Just name it functions.php nothing more.

    You should NEVER have to remove anything from header.php not sure what you are doing there either. We rarely advise editing / removing / doing anything in parent files.

    if ( ! function_exists( 'simplemarket_start' ) ) :
    function simplemarket_start() {
    	// Language set up
    	define('TEMPLATE_DOMAIN', 'simplemarket');
    	load_theme_textdomain(TEMPLATE_DOMAIN, get_template_directory() . '/languages/');
    	$locale = get_locale();
    	$locale_file = get_template_directory() . "/languages/$locale.php";
    	if ( is_readable( $locale_file ) )
    		require_once( $locale_file );
    
    	// Default content-width
    	global $content_width;
    	if ( ! isset( $content_width ) ) {
    		$content_width = 740;
    	}
    
    	// Set up the various actions and theme support used in this theme
    	add_action( 'wp_enqueue_scripts', 'simplemarket_load_scripts' );
    	add_action( 'widgets_init', 'simplemarket_widgets_init' );
    	add_action( 'init', 'simplemarket_register_menus' );
    	add_editor_style();
    	add_theme_support('automatic-feed-links');
    	add_theme_support('post-thumbnails');
    	add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'video', 'image', 'quote', 'status', 'chat' ) );
    	set_post_thumbnail_size( 400,300, true );
    	add_image_size( 'single-post-thumbnail', 999, 9999 );
    	add_custom_background();	
    
    	// set up the custom header support and sizes - this does resize
    	add_custom_image_header( 'simplemarket_header_style', 'simplemarket_admin_header_style' );
    	define( 'HEADER_TEXTCOLOR', '' );
    	define( 'HEADER_IMAGE_WIDTH', apply_filters( 'simplemarket_header_image_width', 1102 ) );
    	define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'simplemarket_header_image_height', 350 ) );
    	define( 'NO_HEADER_TEXT', true );
    }
    endif;
  • Byronmarkets
    • Flash Drive

    Thank you for these pointers, highly appreciated.

    My apologise, my poor wording must be confusing. I was not editing the parent functions.php I created a child function.php, copied the entire parent function and simple changed the functions here.

    This still has not changed the text or the image load function in the back-end where you load the image. It still has the original size 350px height and not my original height 100px and it will not allow me to upload images of the new size, but it will now set the image to 100px.

    This makes it difficult to get the image the correct size.

    Is there something I need to add to the child css? I have found it difficult to locate documentation on how to amend code in the child css...

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.