{"id":303,"date":"2024-01-02T15:42:50","date_gmt":"2024-01-02T10:12:50","guid":{"rendered":"https:\/\/abhishekdeyroy.com\/articles\/test\/articles\/?p=303"},"modified":"2024-01-02T15:42:50","modified_gmt":"2024-01-02T10:12:50","slug":"custom-code-to-set-manual-ads-in-blog-post","status":"publish","type":"post","link":"https:\/\/abhishekdeyroy.com\/articles\/custom-code-to-set-manual-ads-in-blog-post\/","title":{"rendered":"Best Ads Setup Custom Code to Set Manual Ads in Blog Post"},"content":{"rendered":"\n<p><\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/abhishekdeyroy.com\/articles\/custom-code-to-set-manual-ads-in-blog-post\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/abhishekdeyroy.com\/articles\/custom-code-to-set-manual-ads-in-blog-post\/#HTML_Code\" >HTML Code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/abhishekdeyroy.com\/articles\/custom-code-to-set-manual-ads-in-blog-post\/#CSS_Code\" >CSS Code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/abhishekdeyroy.com\/articles\/custom-code-to-set-manual-ads-in-blog-post\/#Section_Targeting_Codes\" >Section Targeting Codes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/abhishekdeyroy.com\/articles\/custom-code-to-set-manual-ads-in-blog-post\/#Final_Words\" >Final Words<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Are you looking to increase your AdSense CPC, CTR, and overall revenue or earnings? In this blog post, we will discuss how you can optimize your ads using HTML code, CSS code, and section targeting codes to maximize your AdSense performance. and especially AdSense revenue or earnings In 2025.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"HTML_Code\"><\/span>HTML Code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>HTML code plays a crucial role in setting up manual ads in your blog post. By customizing the HTML code, you can control the placement, size, and appearance of your ads. Here are some key HTML codes you can use:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ad Unit Code:<\/strong> This code displays a specific ad unit on your blog post. It includes the ad size, ad type, and ad slot information.<\/li>\n\n\n\n<li><strong>Ad Placement Code:<\/strong> This code determines the exact location where you want to display your ad within your blog post. You can place it at the beginning, middle, or end of your content.<\/li>\n\n\n\n<li><strong>Responsive Ad Code:<\/strong> This code allows your ads to automatically adjust their size and layout based on the user&#8217;s device and screen size. It ensures that your ads look great on both desktop and mobile devices.<\/li>\n<\/ul>\n\n\n\n<p>Paste this code in your website where you want to show ads.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"desktopx\"&gt;\n\n        \/\/Place your ad code here\n\n&lt;\/div&gt;\n\n&lt;div class=\"mobilex\"&gt;\n\n       \/\/Place your ad code here\n\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CSS_Code\"><\/span>CSS Code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>CSS code is used to style and customize the appearance of your ads. With CSS, you can modify the font, color, background, and other visual elements of your ads. Here are some CSS codes you can use:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Font Styling:<\/strong> You can use CSS to change the font family, size, weight, and style of your ad text. This helps you match the ad&#8217;s appearance with the overall design of your blog post.<\/li>\n\n\n\n<li><strong>Background Color:<\/strong> CSS allows you to set a specific background color for your ads, making them more visually appealing and attention-grabbing.<\/li>\n\n\n\n<li><strong>Border Styling:<\/strong> You can use CSS to add borders to your ads, giving them a defined and professional look.<\/li>\n<\/ul>\n\n\n\n\n\n\n<p>Paste this code in your additional CSS <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.desktopx{\n\tdisplay:block;\n\t\n}\n.mobilex{\n\tdisplay:none;\n}\n\t\n@media (max-width: 768px) {\n\t.desktopx{\n\tdisplay:none;\n\n}\n.mobilex{\n\tdisplay:block;\n}\n}<\/code><\/pre>\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Section_Targeting_Codes\"><\/span>Section Targeting Codes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Section targeting codes are used to specify the sections of your blog post where you want to display your ads. By using these codes, you can ensure that the ads are relevant to the content and context of the specific sections. Here are some section targeting codes you can implement:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Start Section Code:<\/strong> This code marks the beginning of a section where you want to display your ads. It helps AdSense understand the context and relevance of your ads.<\/li>\n\n\n\n<li><strong>End Section Code:<\/strong> This code marks the end of a section where you want to display your ads. It tells AdSense that the section has ended and the ads should not be displayed beyond this point.<\/li>\n<\/ul>\n\n\n\n<p>For this, Google has provided the following HTML tags. The Google ad-serving algorithm recognizes these tags:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!-- google_ad_section_start --&gt;\n\n&lt;!-- google_ad_section_end --&gt;<\/code><\/pre>\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Final_Words\"><\/span>Final Words<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Optimizing your ads using HTML code, CSS code, and section targeting codes can significantly improve your AdSense performance. By customizing the appearance and placement of your ads, you can attract more clicks, increase your CPC, and ultimately boost your AdSense revenue or earnings. Experiment with different codes and monitor the results to find the best combination for your blog post. Remember to always comply with AdSense policies and guidelines to ensure a positive user experience.<\/p>\n\n\n\n<p>Implement these strategies in 2025 and stay ahead of the competition. Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Are you looking to increase your AdSense CPC, CTR, and overall revenue or earnings? In this blog post, we &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Best Ads Setup Custom Code to Set Manual Ads in Blog Post\" class=\"read-more button\" href=\"https:\/\/abhishekdeyroy.com\/articles\/custom-code-to-set-manual-ads-in-blog-post\/#more-303\" aria-label=\"Read more about Best Ads Setup Custom Code to Set Manual Ads in Blog Post\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":307,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,8],"tags":[5,6,9],"class_list":["post-303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-earning","category-howto","tag-adsense-optimization","tag-css-code","tag-html-code","resize-featured-image"],"featured_image_src":"https:\/\/abhishekdeyroy.com\/articles\/wp-content\/uploads\/2024\/01\/Ads-Setup-Custom-Code-AbhishekDeyRoy.png","author_info":{"display_name":"abhishekdeyroy","author_link":"https:\/\/abhishekdeyroy.com\/articles\/author\/abhishekdeyroy\/"},"_links":{"self":[{"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":0,"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/posts\/303\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/media\/307"}],"wp:attachment":[{"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/media?parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/categories?post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abhishekdeyroy.com\/articles\/wp-json\/wp\/v2\/tags?post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}