WordPress.org

Ready to get started?Download WordPress

Forums

adding new field under "author" (3 posts)

  1. bluesmap
    Member
    Posted 6 years ago #

    so this is the question i have. the answer, im assuming, would involve also recoding the backend.

    In addition to having an option to select AUTHOR for each post, how can i also add a field where i can type in the name of the photographer? for each post i want to be able to credit whoever the photographer was that provided the photos on my website. currently i am just using a blockquote at the end of each post but im looking to have something that will present a better layout.

    i dont know how to code this but i am going to try and find where the author script is on the backend, maybe duplicate it, and rewrite it to reflect what i want????

    please help this is the last thing i need done before i continue to launch my website. thanks

  2. scribblerguy
    Member
    Posted 6 years ago #

    What you'll want to do is to use custom fields. The More Fields plugin can make the entering part easy, but you'll need to add a line or two of code to your theme's template files.

    Let's say that you name your custom field "photog". The code you'll have to add will look something like this:

    <?php if ( post_custom('photog') { ?>
    Photos by  <?php post_custom('photog'); ?>
    <?php } ?>

    Make sure that wherever you put this code, it is inside The Loop.

  3. autoindustriya
    Member
    Posted 5 years ago #

    How do I make the content into a link like the Author?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.