Elegant Theme’s Chameleon Theme – Page Descriptions

The Chameleon Theme is another beautiful and responsive theme by Elegant Themes. I have already included a list of html edits I used to customize the look and feel of this theme for a client in a previous post, such as:

  • edit logo and tagline position
  • change text size in quote size 2
  • add read more button in content area
  • change title in multi media bar
  • change footer, “designed by, powered by”

Please refer to that post for more details.

 

How to Add Page Descriptions- Tagline

When you look at the Chameleon theme preview, a tagline known as the page descriptions is allowed under the page title, a sort of tagline for each page. However, when you read the Chameleon Theme’s readme page, it doesn’t tell you how to add the page descriptions, nor can you find anywhere on the wordpress composing page to put the page descriptions. Luckily, this is how it is done:

In the custom fields area on a page,

You will need to enter the custom field with: Description
Then enter your choice of text in the value section.
This solution only works for pages.

 
 

Add Post Descriptions- Tagline

If you want to add a tagline to your posts which will appear under the post title, you will need to locate the top_info.php file, and replace all the text with this:

<div id=”category-name”>
<div id=”category-inner”>
<?php
$et_tagline = ”;
if( is_tag() ) {
$et_page_title = esc_html__(‘Posts Tagged &quot;’,’Chameleon’) . single_tag_title(”,false) . ‘&quot;’;
} elseif (is_day()) {
$et_page_title = esc_html__(‘Posts made in’,’Chameleon’) . ‘ ‘ . get_the_time(‘F jS, Y’);
} elseif (is_month()) {
$et_page_title = esc_html__(‘Posts made in’,’Chameleon’) . ‘ ‘ . get_the_time(‘F, Y’);
} elseif (is_year()) {
$et_page_title = esc_html__(‘Posts made in’,’Chameleon’) . ‘ ‘ . get_the_time(‘Y’);
} elseif (is_search()) {
$et_page_title = esc_html__(‘Search results for’,’Chameleon’) . ‘ ‘ . get_search_query();
} elseif (is_category()) {
$et_page_title = single_cat_title(”,false);
$et_tagline = category_description();
} elseif (is_author()) {
global $wp_query;
$curauth = $wp_query->get_queried_object();
$et_page_title = esc_html__(‘Posts by ‘,’Chameleon’) . $curauth->nickname;
} elseif ( is_single() || is_page() ) {
$et_page_title = get_the_title();
$et_tagline = get_post_meta($post->ID,’Description’,true) ? get_post_meta($post->ID,’Description’,true) : ”;
}
?>
<h1><?php echo wp_kses( $et_page_title, array( ‘span’ => array() ) ); ?></h1>
<?php if ( $et_tagline <> ” ) { ?>
<p><?php echo wp_kses( $et_tagline, array( ‘span’ => array() ) ); ?></p>
<?php } ?>

</div> <!– end #category-inner –>
</div> <!– end #category-name –>

 

Then again, use the custom fields area to add the tagline just like on the pages.

 

Edit “Read More” in Chameleon Slider

To change the “read more” link in the slider of the Chameleon theme, go to the theme’s includes folder and open the featured.php file.

Find this line and replace the “read more”:

<a href=”<?php the_permalink(); ?>”><?php esc_html_e(‘ReadMore’, ‘Chameleon’); ?></a>