Display Stylish Affiliate link Below Post Title in WordPress


Today Tutorial we are Going to see About Display Stylish Affiliate link Below Post Title in WordPress.After Google Adsense Affiliate Marketing is the Best Earning Source for bloggers.Most of the Bloggers Want to show Attractive Stylish Banner’s ad’s in there Blog’s but we can also attract Our website visitor’s by Display Stylish Affiliate link I Bet you it will Give the Good result for you.Most Powerful Placement for Advertisement is Below Post title  🙂

Display Stylish Affiliate link Below Post Title in WordPress

Display your Stylish Affiliate Link Below WordPress Post title Without Using Any WordPress Plugin Everytime Trusting Plugin is not a Good Idea I want Everyone to learn WordPress Customization From Scratch  🙂

  • Log in to your WordPress Dashboard
  • Go to Appearance -> editor in your WordPress Admin Dashboard or Use FTP to log in your WordPress website’s File Directory go to wp-content/themes/your theme
  • Open Functions.php File
  • Copy the Below PHP Code and Paste it on the Functions.php file and save it

add_filter('the_content', 'add_my_content');
function add_my_content($content) {

$my_custom_text = '<div class="mmv">Your Text <strong>Your Text</strong> Your Text ➜ <strong><a href="Your Affiliate Link" target="_blank">[SIGN UP NOW] <i class="fa fa-external-link" aria-hidden="true"></i></a></strong></div><br />';

if(is_single() && !is_home()) {
$content = $my_custom_text.$content;
}
return $content;
}

  • Now add the Below CSS Code Most of the WordPress themes Comes with Custom CSS Option.If your WordPress theme Does not have this Feature Means Just install Simple Custom CSS WordPress Plugin.

 


.mmv{
padding: 3px;
padding-left: 10px;
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
background-color: #FEBD17;
border-radius: 9px;
box-shadow: 2px 2px 2px;
border: #000 1px solid;
}

  • That’s all Now Open your WordPress Post and Check the Below Post Title.

awt-hcc1

Customization

  • In Above PHP Code your can Find the Below Codes on Line No 4
$my_custom_text = '<div class="mmv">Your Text <strong>Your Text</strong> Your Text ➜ <strong><a href="Your Affiliate Link" target="_blank">[SIGN UP NOW] <i class="fa fa-external-link" aria-hidden="true"></i></a></strong></div><br />';
  • Just replace the Texts and Link with your Affiliate Information. (Note – Don’t Remove the <div class=”mmv”> </div> Tags this is For style your Affiliate Link Heading )
  • You Need to Install Font awesome icon CSS For Show The External Link Icon.

Here Some CSS Code for Stylish Affiliate Link Heading

Below Post Title in WordPress


.mmv {
padding: 3px;
text-shadow: -1px -1px 0px #000000;
box-shadow: -2px 2px 3px #000;
padding-left: 10px;
margin-bottom: 7px;
}

Below Post Title in WordPress


.mmv {
border: 1px dashed #C7C7C7;
padding: 3px;
box-shadow: 2px 2px 5px;
padding-left: 10px;
margin-bottom: 7px;
border-radius: 10px;
border-bottom-color: #000;
background: rgba(218, 218, 218, 0.04);
border-bottom-right-radius: 100px;
}

If you are well in CSS.Design your Own Stylish Heading.


.mmv {

Your Custom CSS

}

 

If you Need Help Please Feel Free to Comment Here Our Team Will Help you

WordPress Plugin for Insert a HTML Widgets on Below Post Title and Below Post Content

 


Was this article helpful?
Thanks!

Your feedback helps us improve Allwebtuts.com



30 Shares
+12
Tweet
Share27
Pin1
Stumble