Addington FAQ and Tips and tricks
From IThemes Codex
Contents |
FAQ
Tips & Tricks
How to add search next to phone number in the top
Before:
After:
1. Using a FTP client or cPanel file manager, navigate to wp-content/themes/Addington/lib/theme-options. Download theme-options.php to your computer as a backup measure.
2. Edit theme-options.php.
Change
<div id="support-button-outer-wrapper">
<div id="support-button-inner-wrapper">
<div id="support-button">
<a href="<?php echo $this->_options['support_button_link']; ?>" <?php if ( ! empty( $this->_options['support_button_caption'] ) ) echo "title=\"{$this->_options['support_button_caption']}\" "; ?><?php if ( ! empty( $this->_options['support_button_new_window'] ) ) echo 'target="_blank"'; ?>><?php echo $this->_options['support_button_text']; ?></a>
</div>
</div>
</div>
to
<div id="support-button-outer-wrapper">
<div id="support-button-inner-wrapper">
<div id="support-button">
<a href="<?php echo $this->_options['support_button_link']; ?>" <?php if ( ! empty( $this->_options['support_button_caption'] ) ) echo "title=\"{$this->_options['support_button_caption']}\" "; ?><?php if ( ! empty( $this->_options['support_button_new_window'] ) ) echo 'target="_blank"'; ?>><?php echo $this->_options['support_button_text']; ?></a>
<?php $search_box_default = __( 'Search...', 'it-l10n-Addington' ); ?>
<?php $search_box_value = esc_attr( apply_filters( 'the_search_query', get_search_query() ) ); ?>
<?php $search_box_value = ( empty( $search_box_value ) ) ? $search_box_default : $search_box_value; ?>
<form method="get" class="search-form" action="<?php echo get_option( 'home' ); ?>">
<input type="text" value="<?php echo $search_box_value; ?>" name="s" class="search-text-box" onfocus="if(this.value == '<?php echo $search_box_default; ?>') this.value = '';" onblur="if(this.value == '') this.value = '<?php echo $search_box_default; ?>';" />
<input type="submit" value="<?php echo esc_attr__( 'Go', 'it-l10n-Addington' ); ?>" class="search-submit-button" />
</form>
</div>
</div>
</div>
Add the following at the end of style.css:
#support-button a {
float: left;
}
#support-button form {
float: right;
margin-top: 2px;
margin-left: 1em;
margin-right: 0.8em;
}
#support-button input {
font-family: "Myriad Pro","Myriad Web",Arial,Helvetica,sans-serif;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
}
#support-button input.search-text-box {
width: 100px;
height: 11px;
font-size: 12px;
padding: 2px 2px 2px 5px;
border: none;
}
#support-button input.search-submit-button {
background: #6aabd1;
color: #FFFFFF;
border: 1px solid #c3cccc;
height: 15px;
font-size: 10px;
padding: 0 4px;
font-weight: bold;
text-transform: uppercase;
}