I would like to add a small sentence showing for eg:For More Effective Weight Loss Tips Go to LINK and lose Weight Quickly or something like that. But I have already made my blog some months before and now I would Like to add this small text of <p>Paragraph</p> before or after each wordpress Blog posts which I already updated. I would like to know how is it possible to do that from editing files from single.php
My single.php file goes like this So here for eg: if I want to add a small paragraph containing my affiliate link at the start of each post or to add a small Paragraph at the end of each post,what should I do?
I wouldn't bother editing single.php, when it comes to editing/adding posts in the future it will just make it awkward . Instead, just run this in phpMyAdmin with your text inside the single quotes: UPDATE wp_posts SET post_content = CONCAT(post_content, 'For More Effective Weight Loss Tips Go to LINK and lose Weight Quickly') WHERE post_type = 'post' Code (markup): It will add that text to the end of every post
If you really want to do it via editing single.php, just add the text underneath: <?php the_content(__('Continue reading','panorama') . ' '' . get_the_title('', '', false) . ''»'); ?> PHP:
Can you show me how do I add this in my PHP my admin.I am using hostgator.Also what should I do to add a small paragraph at the start of each post.Like for eg:"UK and Canada Users,click here for the same offer" to be added at the start of each and every post linking to a different Page altogether
First you need to go to your cPanel. http://www.your-site.co.uk:2082/ and log in with you account details. (host will have provided you with them) Then look for the phpMyAdmin link, click that. Then on the left above where it says "Please select a database" - look for something that looks like wordpress or if theres only one line, click that. Now near the top there should be a tab called "SQL", click it. Copy and paste the SQL code into the box and click 'Go'. Here is the SQL code to put text at the beginning of every post, once again - change text to suite what ever you want . UPDATE wp_posts SET post_content = CONCAT('UK and Canada Users,click here for the same offer ', post_content) WHERE post_type = 'post' Code (markup):