Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

[SOLVED] How to Add Text to ALL Posts?


  #1  
Old Apr 9, 2009, 11:13 AM
strangelove's Avatar
strangelove
 
29 posts · Feb 2009
I wish to add a few lines of text to all posts (and occassionally change the text, probably), at the BOTTOM of the post -- not in the byline or the footer areas.

Is this possible (without editing every post)?

Dr. Strangelove
Watching YouTube
  #2  
Old Apr 9, 2009, 03:19 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
If I'm not mistaken, you could add it in the body of your index.php file, but then you'd have to re-edit it to change it.

I did this to create some custom templates for certain categories, where I wanted certain text and photos to appear on every post in that category. For instance, at http://www.larchmontgazette.com/2009...e-right-place/ , the intro text at the top, the photo and text under the photo and the Ask a question form are built into the template.

Here is what the new template looks like, where I put the photo, text under the photo and the question form:

Code:
<!-- Post Body Copy -->				
		<div class="post-bodycopy clearfix">
		<?php if ((is_home() && $bfa_ata_excerpts_home == "Full Posts") OR 
		(is_category() && $bfa_ata_excerpts_category == "Full Posts") OR 
		(is_date() && $bfa_ata_excerpts_archive == "Full Posts") OR 
		(is_tag() && $bfa_ata_excerpts_tag == "Full Posts") OR 
		(is_search() && $bfa_ata_excerpts_search == "Full Posts") OR 
		(is_author() && $bfa_ata_excerpts_author == "Full Posts") OR 
		is_single() OR 
		is_page() OR (is_home() AND !is_paged() AND $postcount <= $bfa_ata_full_posts_homepage) ) { 
			$bfa_ata_more_tag_final = str_replace("%post-title%", the_title('', '', false), $bfa_ata_more_tag);
			the_content(bfa_escape($bfa_ata_more_tag_final)); 

		} else { 
			the_excerpt(); 
		} ?>

	<p align="center"><img src="/wp27/wp-content/uploads/2009/03/3gardeners.jpg" width="350"></p>
Ann Mangone, Jennifer Jensen and Toni Porter have completed the Cornell Cooperative Extension of Westchester's Master Gardener Program, and are active in gardening-related activities in the community. You may have seen them last summer at the Master Gardener Booth at the Larchmont Farmers Market, where they will be offering advice again this year beginning in June.	
<h5><a name="form"></a>Ask a question about your garden:</h5>
            <form name="Garden Guide" method="POST" action="/cgi-pub/FormMail/">

              <p> Name: 
                <input type="text" name="name">
                <INPUT TYPE="HIDDEN" NAME="recipient" VALUE="garden@larchmontgazette.com">
                <INPUT TYPE="HIDDEN" NAME="SUBJECT" VALUE="Garden">
                <INPUT TYPE="HIDDEN" NAME="REPLY-TO" VALUE="garden@larchmontgazette.com">
                <INPUT TYPE="HIDDEN" NAME="FROM" VALUE="garden@larchmontgazette.com">
              </p>
              <p>Email: 
                <input type="text" name="email">

              </p>
              <p>Question:</p>
              <textarea name="question" cols="40" rows="10"></textarea>
              <p></p>
              <p> 
                <input type="submit" name="Submit" value="Submit">
                <input name="Reset" type="reset" id="Reset" value="Erase">
              </p>

            </form>

</div>

						
		<?php // Post Pagination 
		if ((is_home() && $bfa_ata_excerpts_home == "Full Posts") OR 
		(is_category() && $bfa_ata_excerpts_category == "Full Posts") OR 
		(is_date() && $bfa_ata_excerpts_archive == "Full Posts") OR 
		(is_tag() && $bfa_ata_excerpts_tag == "Full Posts") OR 
		(is_search() && $bfa_ata_excerpts_search == "Full Posts") OR 
		(is_author() && $bfa_ata_excerpts_author == "Full Posts") OR 
		is_single() OR 
		is_page() ) {
			wp_link_pages('before=<p class="post-pagination"><strong>' . __('Pages:','atahualpa') . '</strong> &after=</p>&next_or_number=number'); 
		} ?>
Maybe there is a much easier, cleaner way to do what you want.
  #3  
Old Apr 9, 2009, 03:25 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You could do this by adding a filter function to the post content. Add the following tightly to the bottom of functions.php without causing any blank lines or spaces:

PHP Code:
<?php        
function bfa_append_to_post($post_body_content) {
$post_body_content $post_body_content 
'YOUR TEXT HERE ....
...MORE TEXT ...
...TEXT ( or HTML) ...'
;
return 
$post_body_content;
}
add_filter('the_content''bfa_append_to_post');
?>
  #4  
Old Jan 28, 2010, 05:12 AM
contentfreak
 
7 posts · Jan 2010
hello flynn

i am also looking to do the same thing
when i have inserted your code the text below the post, above the comments

i want to insert text above the posts, below the title
is there an easy way to do this?

Last edited by contentfreak; Jan 28, 2010 at 11:43 AM.
  #5  
Old Feb 28, 2010, 12:53 PM
outofdebtagain
 
8 posts · Sep 2009
I have found the PostPost plug-in to work very nicely with Atahualpa. You can choose what to insert before or after content on posts or pages.

Quote:
Originally Posted by contentfreak

when i have inserted your code the text below the post, above the comments

i want to insert text above the posts, below the title
is there an easy way to do this?
Mrs. Accountability
Out of Debt Again

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static text/banner image before posts in "posts page" verbalicious Page & Category Menu Bars 14 Nov 12, 2010 05:27 AM
Remove blog title text add image benw Header configuration & styling 4 Apr 28, 2009 03:50 PM
Add text in Category Bar bg74blogger Page & Category Menu Bars 1 Apr 19, 2009 07:29 AM
Add something over/before the posts on tag/cat pages chris Atahualpa 3 Wordpress theme 1 Feb 23, 2009 03:13 PM
How to add text in Search Widget sagatr Sidebars & Widgets 2 Feb 8, 2009 04:06 AM


All times are GMT -6. The time now is 06:58 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.