Quantcast
Viewing all articles
Browse latest Browse all 4335

Reply To: Pre-sales Question: Form placement on top banner possible..??

Thanx Sakin.

I have done what you have suggested but any changes I make in the functions.php file does not reflect on the site.

I have the functions.php file in /wp-content/themes/kathmandu-child/

Can you tell me what I am doing wrong…??

Here are the contents of my functions.php file:

<?php

function catchkathmandu_featured_image() {
	//delete_transient( 'catchkathmandu_featured_image' );	
	
	// Getting Data from Theme Options Panel
	global $catchkathmandu_options_settings, $catchkathmandu_options_defaults;
   	$options = $catchkathmandu_options_settings;
	$defaults = $catchkathmandu_options_defaults;
	$enableheaderimage = $options[ 'enable_featured_header_image' ];
		
	if ( !$catchkathmandu_featured_image = get_transient( 'catchkathmandu_featured_image' ) ) {

		if ( !empty( $options[ 'featured_header_image' ] ) ) {
			
			$catchkathmandu_featured_image = '<div id="header-image">';
			
			// Header Image Link and Target
			if ( !empty( $options[ 'featured_header_image_url' ] ) ) {
				//support for qtranslate custom link
				if ( function_exists( 'qtrans_convertURL' ) ) {
					$link = qtrans_convertURL($options[ 'featured_header_image_url' ]);
				}
				else {
					$link = esc_url( $options[ 'featured_header_image_url' ] );
				}
				//Checking Link Target
				if ( !empty( $options[ 'featured_header_image_base' ] ) )  {
					$target = '_blank'; 	
				}
				else {
					$target = '_self'; 	
				}
			}
			else {
				$link = '';
				$target = '';
			}
			
			// Header Image Title/Alt
			if ( !empty( $options[ 'featured_header_image_alt' ] ) ) {
				$title = esc_attr( $options[ 'featured_header_image_alt' ] ); 	
			}
			else {
				$title = ''; 	
			}
			
			// Header Image
			if ( !empty( $options[ 'featured_header_image' ] ) ) :
				$feat_image = '<img class="wp-post-image" src="'.esc_url( $options[ 'featured_header_image' ] ).'" />'; 	
			else:
				// if empty featured_header_image on theme options, display default
				$feat_image = '<img class="wp-post-image" src="'.esc_url( $defaults[ 'featured_header_image' ] ).'" />';
			endif;
			
			$catchkathmandu_featured_image = '<div id="header-featured-image">';
				// Header Image Link 
				if ( !empty( $options[ 'featured_header_image_url' ] ) ) :
					$catchkathmandu_featured_image .= '<a title="'.$title.'" href="'.$link.'" target="'.$target.'"><img id="main-feat-img" class="wp-post-image" alt="'.$title.'" src="'.esc_url( $options[ 'featured_header_image' ] ).'" /></a>'; 	
				else:
					// if empty featured_header_image on theme options, display default
					$catchkathmandu_featured_image .= '<img id="main-feat-img" class="wp-post-image" alt="'.$title.'" src="'.esc_url( $options[ 'featured_header_image' ] ).'" />';
				endif;
			$catchkathmandu_featured_image .= '</div><!-- #header-featured-image -->';
		}
			
		set_transient( 'catchkathmandu_featured_image', $catchkathmandu_featured_image, 86940 );	
	}	
	
	echo $catchkathmandu_featured_image;
	
} // catchkathmandu_featured_image

Thanx in advance.

–d.


Viewing all articles
Browse latest Browse all 4335

Trending Articles