Home >CMS Tutorial >WordPress >How to add advertising space in WordPress
1. Add ads in the WordPress sidebar:
Enter the blog backend widgets, drag the Text tool into the sidebar, expand Text, and paste the ad code directly into it and save it. That’s it.
2. Add ads at the top of WordPress article content:
Open "single.php" in the theme directory and find where the "dcc7971ea2fb1ccad717c5cd04c83203" code is located.
Just add the advertising code above "dcc7971ea2fb1ccad717c5cd04c83203":
<div style=”padding:0px 10px″>广告代码</div>
Related recommendations: "WordPress Tutorial"
3. Insert advertisements at the bottom of WordPress article content:
The method is similar to inserting advertisements at the top of the article. The difference is that the advertising code must be added below "dcc7971ea2fb1ccad717c5cd04c83203":
<div style=”padding:0px 10px″>广告代码</div>
4. Insert surrounding ads on the left or right side of the WordPress article:
In the same way, add the ad code above "dcc7971ea2fb1ccad717c5cd04c83203":
<div style="float:left;width:336px;height:280px;">广告代码</div>
The above is the detailed content of How to add advertising space in WordPress. For more information, please follow other related articles on the PHP Chinese website!