Type of header in GridMarket Theme Options to "Title" in blog template is not working

Hi.

When i try to set Type of header in GridMarket Theme Options to "Title" in blog template is not working please check video below.

video take about 20sec to start:
http://www.swfcabin.com/open/1320480389

  • Mason
    • DEV MAN’s Sidekick

    Hiya erikjohansson,

    I'm able to reproduce this on my install with any language activated besides English.

    Choosing the 'Text' option and adding some custom text does seem to work, but both Custom Header and Site Title don't seem to show the radio button correctly. I'd note that for me it does actually work as far as what it displays on the front end, it's just the verification in the admin that's having issues.

    I'll ask the theme developer what can be done.

    Thanks!

  • Tammie
    • WordPress Wizard

    The problem isn't a bug it's that the type of header used by name to then show each different output in the header file.

    The recommendation has always been for you to change also the values in the header file for instance if you called it jambon, you'd have to change it to jambon in the file also.

    I can see how this perhaps isn't ideal for multilingualism so let me go and take a look at an enhancement for this. Until then please change the variable yourself in the child theme. I can't estimate a patch I am just working on a theory with that.

  • Tammie
    • WordPress Wizard

    I've been researching this a little and the best method is this for all.

    1. Change the options-values.php files as you should be for instance:

    $logo_options = array(
    	'Text' => array(
    		'value' => 'Text',
    		'label' => __( 'Text' )
    	),
    	'Header' => array(
    		'value' => 'Header',
    		'label' => __( 'Custom Header or Logo *we use the custom header to allow you control over logos' )
    	),
    	'Name' => array(
    		'value' => 'Name',
    		'label' => __( 'Site Title' )
    	)
    );

    This you can see in options calls a child file so you can put that file in your child theme to do this. I would suggest you use a child theme version of GridMarket or create a child if using FrameMarket itself.

    From there you want to copy header.php into your theme or adjust your copy of header.php.

    <?php
    								$options = get_option('framemarket_theme_options');
    								$logotype = $options['logoinput'];
    								$logotext = $options['logotext'];
    								if ($logotype == "Text" ){
    							?>
    									<div id="site-logo">
    									<a href="<?php echo home_url(); ?>"><?php echo $logotext; ?></a>
    									</div>
    							<?php
    							}
    							else if ($logotype == "Name" ){
    							?>
    									<div id="site-logo"><a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a></div>
    							<?php
    							}
    							else if ($logotype == "Header"){
    								?>
    								<h1><a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a></h1>
    								<?php
    							}
    							else{
    								?>
    								<div id="site-logo"><a href="<?php echo home_url(); ?>"><?php _e( 'gridmarket', 'framemarket' ) ?></a></div>
    								<?php
    							}
    							?>

    See where it is checking $logotype? Each of those make sure you change to be your new name.

    That should work for any languages and any combinations you want.

    Now, we are also looking at a different way to do theme options but for now this work as the recommended method.

  • Mason
    • DEV MAN’s Sidekick

    Hiya dustedrob,

    Sorry about the delay on this. As mentioned above we have a new developer on this, but for the time being does the manual fix work for you?

    If you let me know more of what you want to do, I'll see what we can do to get ya sorted asap.

    Thanks!

  • marcopoltro
    • New Recruit

    Hi @all
    We have solved this bug.

    The problem are the "label" value: text, header, name.

    On WP admin area, the standard label are translated (for example on italian are test, testate, nome) and the value cannot be set correctly

    To fix:

    1. change option-values.php (simply added "_Option" at the end of 3 label value)

    $logo_options = array(
    'Text' => array(
    'value' => 'Text_Option',
    'label' => __( 'Text' )
    ),
    'Header' => array(
    'value' => 'Header_Option',
    'label' => __( 'Custom Header or Logo *we use the custom header to allow you control over logos' )
    ),
    'Name' => array(
    'value' => 'Name_Option',
    'label' => __( 'Site Title' )
    )
    );

    2. Change header.php

    <?php
    $options = get_option('framemarket_theme_options');
    $logotype = $options['logoinput'];
    $logotext = $options['logotext'];
    if ($logotype == "Text_Option" ){
    ?>
    <div id="site-logo">
    "><?php echo $logotext; ?>
    </div>
    <?php
    }
    else if ($logotype == "Name_Option" ){
    ?>
    <div id="site-logo">"><?php bloginfo('name'); ?></div>
    <?php
    }
    else if ($logotype == "Header_Option"){
    ?>
    <h1>"><?php bloginfo('name'); ?></h1>
    <?php
    }
    else{
    ?>
    <div id="site-logo">"><?php _e( 'gridmarket', 'framemarket' ) ?></div>
    <?php
    }
    ?>
    <div id="site-advert">
    <?php
    $options = get_option('framemarket_theme_options');
    $advert = $options['adverttextarea'];
    if ($advert != ""){
    echo stripslashes($advert);
    }
    ?>

    Enjoy :slight_smile:
    Marco

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.