WordPress.org

Ready to get started?Download WordPress

Forums

How do I create a signature at the bottom of each post? (6 posts)

  1. KarmaSamten
    Member
    Posted 6 years ago #

    Sorry, this might be asked a lot of times, I'm new to WP, How do I create a signature at the bottom of each post?

  2. JamesICT
    Member
    Posted 6 years ago #

    You could just write it into your code via the index.php and single.php

    Look for the the <?php the_content(); ?> call and place whatever signature you would like, after that.

    For example:

    <?php the_content(); ?>
    <p class"sig"> My signature here</p>

    The style it using the .sig class in your CSS.

  3. alyas2022
    Member
    Posted 6 years ago #

    By using this code ' <p class"sig"> aLyas2022</p>' it will display the same signature : "aLyas2022" in all posts, even thous wroten by another user !

    Can i change the "aLyas2022" in the code by a function or something like the_user() so its the name of the auteurs which going to be displayed ?

  4. JamesICT
    Member
    Posted 6 years ago #

    Sorry, you did not mention that you will have more than one author.

    Instead then, you could use the <?php the_author_description(); ?> function in this case. It needs to be setup in each user's profile, but the content could be used as the signature.

    For more information on the above template tag, take a look at http://codex.wordpress.org/Template_Tags/the_author_description

  5. KarmaSamten
    Member
    Posted 6 years ago #

    Sorry for that, but where do I put "<?php the_author_description(); ?>"? where is Index.php?

    I'm a little new to WP, sorry

  6. JamesICT
    Member
    Posted 6 years ago #

    I am not sure what theme you are using, but generally you should be able to see something like this in your index.php and single.php files in your theme directory.

    <?php the_content(__('continued...')); ?>

    I would add the following code below this

    <p class="sig"><?php the_author_description(); ?></p>

    and then style the sig as suggested above, via your CSS.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags