So I decided to come up with the plugin that will help me insert that AdSense or Paypal Donation code into the middle of article.
After the creation, you can find that the newly added entry is shown in the bottom. Copy the usage code example and insert it in your article. That’s all.
Basically, you can place the specific tag element
[hana-code-insert name='...' /] in your wordpress article to show the codes. The ‘name’ attribute is mandatory where you use the name of the code entry that you want to show.
For example, after you setup a code entry in the admin Settings with the name ‘AdSense’, you can invoke the code by using below element in your article.
[hana-code-insert name='AdSense' /]
Here are the actual working samples.
[hana-code-insert name='donation' /]
[hana-code-insert name='donation with amount' /]
[hana-code-insert name='adsense' /]
Here is the actual code used when setting up in the Settings/Options page with name “php example”.
print<|$styles>|> "<div style='border:1px dotted red; padding: 5px;'>"; print<|$styles>|> date<|$styles>|>("m/d/Y H:i:s"); print<|$styles>|> "</div>";
And here is the text inserted in the middle of the article.
[hana-code-insert name='php example' /]
If you have any question, leave in the comment section.