WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Auto add word to end of post (4 posts)

  1. jjkilpatrick
    Member
    Posted 5 years ago #

    Is there way to add a "signiture" to the end of my posts.

    Once the user has written the post i'd like it to have "- thank you for the memory" added to there post at the end without them having to type it.

    Thanks

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Try editing single.php and looking for <?php the_content();?>. Immediately after that line, try adding:

    <p class="sig">- thank you for the memory</p>

  3. jjkilpatrick
    Member
    Posted 5 years ago #

    Hmm I can't find that in my single.php

    I'm thinking it may slot inside my entry.php somewhere?

    <?php $current_user_id = get_the_author_ID(); ?>
        <li id="prologue-<?php the_ID(); ?>" class="post user_id_<?php the_author_ID( ); ?>">
    		<?php echo prologue_get_avatar( $current_user_id, get_the_author_email( ), 48 ); ?>
    		<?php prologue_the_title("<h2>","</h2>"); ?>
    	    <h4>
    		    <span class="meta">
    		        <?php printf( __('%s <em>on</em> %s', 'p2'),  get_the_time(), get_the_time( get_option('date_format') ) ); ?>
    
    			    <br />
    			    <?php tags_with_count( '', __( 'Tags:' , 'p2').' ', ', ', ' ' ); ?>
    		    </span>
    	    </h4>
    	    <div class="postcontent<?php if (current_user_can( 'edit_post', get_the_id() )) {?> editarea<?php } ?>" id="content-<?php the_ID(); ?>">
    	        <?php the_content( __( '(More ...)' , 'p2') ); ?>
    	    </div> <!-- // postcontent -->
            <div class="bottom_of_entry">&nbsp;</div>
    	    <?php
    		    if ( ( is_home() || is_front_page() ) ) $withcomments = true;
    
    		    if ( is_single() )
    		        comments_template();
    		    else
    		        comments_template('/inline-comments.php');
    
                // Only append comment form to  first post with open comments
                if( ( !isset($form_visible) || !$form_visible ) && !is_single() && 'open' == $post->comment_status ):
                    $form_visible = true;
            ?>
            <div style="display:none">
                <div id="respond" style="display:none">
                <?php require dirname( __FILE__ ) . '/comment-form.php'; ?>
                </div> <!-- #respond -->
            </div> <!-- #wp-temp-form-div -->
    <?php
                endif; // if open comment_status
    ?>
        </li>
  4. jjkilpatrick
    Member
    Posted 5 years ago #

    Haha, just seen it right in front of my eyes.

    Thanks for the help!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.