Gridmarket theme_options hiding options?

is it possible to hide certain items on the theme_options admin page for gridmarket?

for example i want the default on "Show shop picker?" to be "Yes" but i want to hide the option to change it to no.

and i want to hide the "Do you want to have a header ad?"

any suggestions?

thanks,
gina

  • Philip John
    • DEV MAN’s Apprentice

    Gina,

    I've discovered the theme options code which you will find in wp-content/themes/framemarket/options/options.php

    It's highly inadvisable to actually change these but if you wish to you should remove the elements from the theme options page within that file and then ensure that those settings are hard-coded upon activation of the theme.

    Phil

  • Tammie
    • WordPress Wizard

    I would strongly not advise you change that file please look to options/options-values.php in (if using) Gridmarket or (if using) FrameMarket.

    Please do NOT edit the options.php file. I am sorry but that is wrong advice if you want to change values. Phil for reference you can use options-values.php to add / edit / delete and even hardcode values.

    To 'hide' you can simply just put a default value that has no value of the current ones and nothing will happen as it is only set to default values. For example:

    $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' )
    	)
    );

    You want those all gone...

    $logo_options = array(
    	'Setform' => array(
    		'value' => 'Not available',
    		'label' => __( 'Setform )
    	)
    );

    You could say whatever the set is... your call there are so many variations you could do:

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

    I think you get the point of how easy just options-values.php means you can achieve this.

    Taking the shop picker example.. just edit to this:

    $picker_options = array(
    	'Yes' => array(
    		'value' => 'Yes',
    		'label' => __( 'Yes' )
    	)
    );

    Then it's only able to be Yes. You may have to set to this or in header.php tweak this:

    <?php  if ( is_multisite() ) {?>
    								<?php
    									$options = get_option('framemarket_theme_options');
    									$showpicker = $options['pickerinput'];
    									if ($showpicker == "Yes"){
    								?>
    						<div id="mp-storepicker">
    							<?php _e( 'Pick a store:', TEMPLATE_DOMAIN ) ?>&nbsp;&nbsp;<?php framemarket_listall_shops(); ?>
    						</div>
    						<?php } ?>
    						<?php } ?>
    						<?php
    					}
    					?>

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.