• 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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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.

    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 ?

    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 https://codex.www.ads-software.com/Template_Tags/the_author_description

    Thread Starter karmasamten

    (@karmasamten)

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

    I’m a little new to WP, sorry

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do I create a signature at the bottom of each post?’ is closed to new replies.