• my website is https://www.doyouknowwhatihate.com

    Where it says submitted by, I’m looking for a plugin or anything to be able to add someone’s name easily after that for each individual post so it will say something like Submitted by Rhonda or submitted by alex etc. Any help would be appreciated. Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Assuming there’s no plugin that would work, you could consider:

    1. Create those authors as users, then edit the Posts and make the post author one of those users.
    2. Use Tags or Categories
    3. Use Custom Fields (Using_Custom_Fields)

    Thread Starter bobbyavidity

    (@bobbyavidity)

    When I use the custom fields, I understand where and how to put the tags on the main index sheet, but how do i customize the author for each individual post if the “key” is just a word, and so is the “value”? It seems like i’d need to have a tag there or something?

    The ‘key’ could be “submitter” and the ‘value’ would then be the name of the person who submitted the post.

    Thread Starter bobbyavidity

    (@bobbyavidity)

    Then what would I have to change the index.php to?

    curently it is:

    <p class=”post-info”>Submitted by <?php the_author(); ?> | Filed under <?php the_category(‘, ‘); ?></p>

    Thread Starter bobbyavidity

    (@bobbyavidity)

    I got it! Thanks. How do I move my meta data next to my | Categories? Right now it’s just stayin at the top.

    Look for <?php the_category()'?> That’s the template tag that creates the category list.

    Thread Starter bobbyavidity

    (@bobbyavidity)

    hmmm. Thats what I have put in already, but It still puts the categories under the submitted by: https://www.doyouknowwhatihate.com

    heres my code:

    <?php the_meta(); ?><p class=”post-info”> | Filed under <?php the_category(‘, ‘); ?></p>

    Try <p class="post-info"><?php the_meta(); ?> | Filed under <?php the_category(', '); ?></p>

    Thread Starter bobbyavidity

    (@bobbyavidity)

    Nope, didn’t work. It stayed in the same spot :/

    Ah – I see what it is. You’re using the wrong tag. the_meta() returns an unordered list.

    Try:

    <p class="post-info">
    <span class="post-meta-key">Submitted by:</span> <?php echo get_post_meta($post_id, 'submitter', true); ?> | Filed under <?php the_category(', '); ?></p>

    (this assumes that you called the custom field “submitter”)

    The other option would be to go back to use the_meta() but to format the_category() into an ordered list item. Then use css to turn the 2 bulleted list items into inline list items.

    <div class="post-info">
    <ul>
    <?php the_meta(); ?>
    <li> | Filed under <?php the_category(', '); ?></li>
    </div>

    CSS:

    .postinfo ul,.postinfo li {
    display:inline;
    margin:0;
    padding:0;
    }
    .postinfo li {
    margin-right:7px;
    }

    Thread Starter bobbyavidity

    (@bobbyavidity)

    The first method put the Submitted by: and Posted under on the same line, but now my custom field for each post doesn’t show up.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Custom author’ is closed to new replies.