hi there, I have a blog... in tht i have to place an image banner and a subscribe to RSS via email form in every post i make.. i mean at the end of the post... So, can how do i do this.. i mean can i edit the single post file from the theme i am using... by placing an <img> tag?? or there is some other way around... Thanks in advance
This is probably the totally wrong way to do this but you could write a new post and copy the code you want in every post. Then Title the next few posts and add the content, save but don't publish and these will act as a template for when you want to make a new post. There is probably an easier way.
Whenever i've wanted to add anything to every post. I have done it as you stated in your first post. Edited the theme to get the image/advert/specific text in the right place. It might be kinda dodgy if your trying to place it in the middle of your post. But if your looking for the top or bottom of each post. Then the theme editing should be the easiet way to deal with it. Just back up your current theme. Then play about with it editing and refreshing the page as you go along until you have it where you want it. Regards DK
I do it by editing the single.php file. You can put another div in there with images, links, etc. Example: <div style="margin: 20px 0; border: 1px dotted #000000;"> <img src="images/rss.gif" alt="rss" width="16" /> Like my blog? Then <a href="http://feeds.feedburner.com/myblog">subscribe to my RSS feed</a>. </div> PHP:
How about if you don't have a single.php file, I have these: * reset-fonts-grids-tabs.css * Stylesheet * Main Index Template * Page Template * Archives * Comments * Footer * functions.php * Header * Search Results * searchform.php * Sidebar
Phil: comments.php usually works in that case (if the theme doesn't use a single.php file). You'd just put the code at the top of the file in this case.
You can also edit the "Main Index Template" script. Find this: <div class="entry"> <?php the_content('Read more »'); ?> </div> PHP: ... and replace it with: <div class="entry"> <?php the_content('Read more »'); ?> <div style="margin: 20px 0; border: 1px dotted #000000;"> Put here whatever you want to show right after your post. </div> </div> PHP: That will put in all your posts anything you want automatically. Give it a try. The "div" tag isn't necessary. I borrowed it from MTBiker's post (hope you don't mind ). P.S.: I'd recommend you backup that file before making any changes to it.