Skip to content Skip to sidebar Skip to footer

WordPress add custom text after post title in Thesis theme

Reading Time: < 1 minute

How to add custom text or google ads after every post tile in wordpress thesis theme.We can use these hook for do this.Open the custom_functions.php in the thesis theme folder.Add the following function end of the file and save it.
File path – /wp-content/themes/thesis/custom/custom_functions.php

This function is keep the custom code.But still not displaying.

function before_post_ads() {
	if (is_single()) { ?>
    
	 }
}

How to add Google adsense code after post title

If you want to add google ad code here, do it as follows.

function before_post_ads() {
	if (is_single()) { 
	 // google ad code here
	}
}

How to Call to this function

add_action('thesis_hook_before_post', 'before_post_ads');

Full script is here.

function before_post_ads() {
	if (is_single()) { ?>
    
	}
}
//call to this function
add_action('thesis_hook_before_post', 'before_post_ads');