Site icon Anthony Carbon

How to add additional HTML after the page title using Visual Composer Fancy title (the7 WordPress theme).

I have a search form to add below page title using Visual Composer Fancy title (the7 WordPress theme) page editor. I look for alternative solutions that I can insert my additional HTML content.

Lucky me to found it, and here’s the code on how to add additional content.

Add this code on your functions.php, can be found in parent theme or child theme.

add_filter( 'presscore_page_title', 'your_shot_presscore_page_title' );
function your_shot_presscore_page_title( $custom_title ){
	if( is_page( 137 ) ) : // Note that 137 is an page of your current page.
		ob_start();
			?>
			 <form class="search-job" action="<?php echo get_permalink( 137 ); ?>" method="get">
				<p class="search-input">
					<input type="text"  name="looking_for" id="looking_for" class="looking_for search-field" value="<?php echo $_GET['looking_for']; ?>" placeholder="I’m looking for"/>
					<input type="text"  name="postcode" id="postcode" class="postcode search-field" value="<?php echo $_GET['postcode']; ?>" placeholder="Postcode"/>
				</p>
				<div class="search-button">
                    <input type="hidden" name="filter" value="<?php echo $_GET['filter']; ?>"  />
					<input type="submit" class="btn-search button" value="Search Jobs Now"  />
				</div>
			</form>
			<?php
		$custom_title .= ob_get_clean();
	endif;
	return $custom_title;	
}

Admin Editor Settings Screenshots

Page Title Front View With Additional HTML (search form) Screenshots

Happy Coding 🙂

Exit mobile version