শনিবার, ১৬ নভেম্বর, ২০১৩

Placing Ads in Your WordPress Blog

Insert code into the index.php file to display ads between posts.Insert ads into text widgets in your blog’s sidebar.
Simply click the Widgets link in the Appearance section of your WordPress dashboard’s left menu to open the Widgets page, where you can click and drag a text widget to your blog’s sidebar. Simply paste the ad code from the advertiser into the text widget, and the ads should begin displaying.

Inserting Ads Between Blog Posts

Some bloggers like to put ads in between blog posts. This isn’t hard to do if you’re comfortable pasting code into your theme’s CSS files. One of the easiest ways to do it is simply inserting an ad immediately after a blog post.
Log in to your WordPress dashboard, and click the Editor link in the Appearance section of your dashboard left menu to open the Edit Themes page. Click the index.php file under the list of Templates on the right side of your screen to open the index.php file.
Insert code into the index.php file to display ads between posts.
Locate the code in the file that says <php if (have -posts ()) : ?>, and place your cursor immediately before that code. Type the following code where your cursor is placed: <?php $count = 1; ?>
Insert code into the index.php file to identify which post you want your ad to display after.
Insert code into the index.php file to identify which post you want your ad to display after.
Once that code is added, you can paste the code for the ad you want to display into the index.php file. Locate the code that says <!-- end .entry --> in your index.php file.
Insert your ad code into your theme’s index.php file.
Insert your ad code into your theme’s index.php file.
Place your cursor immediately after that code, and paste the ad code in that position. Click the Update File button to save your changes. Ads will start to display below your first blog post.
You can insert ads after a post in your blog.
You can insert ads after a post in your blog.
Some WordPress theme CSS files are structured differently from the example shown in this guide. If the code you need isn’t in your theme’s index.php file, it may be in a separate loop.php file. If your theme is not as clear as the one used in this example, contact the theme developer for help or try to use one of the plug-ins listed later in this chapter to position ads on your blog.

Inserting Ads in Blog Posts

You can insert ads into your blog posts by editing your post.php file in your WordPress CSS editor so ads always appear in the same location in all your blog posts. The spot where you insert your ad code varies depending on where you want ads to appear. For example, you can insert ads at the beginning of your posts, right aligned, left aligned, at the end of your posts, and so on. It’s up to you. Just remember that you don’t want ads to detract from the content in your posts and interrupt or damage the user experience on your blog.
Fortunately, a number of WordPress plug-ins can help you manage ads and place ads in a variety of locations on your blog. For example, Wp-Insert might offer the help you need for the ad program you participate in.
Remember, the WordPress Codex is an excellent resource to get answers to questions about editing theme files.
One note of warning: WordPress does have a few restrictions as to what kind of ads can be placed on their site, so be sure to check their support page before posting your ads. For more information on setting up your WordPress blog, check out our Quick Guides on Setting Up Your WordPress Blog Feed and How to Find and Hire a Designer for Your WordPress Blog. Good luck, and happy blogging!

কোন মন্তব্য নেই: