How to show who posted event?

Home Forums Calendar Products Events Calendar PRO How to show who posted event?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #607044
    persyst
    Participant

    How do I include the username of the user that posts an event in the event page?

    #617130
    Casey D
    Member

    Hello persyst,

    Thanks for contacting us! Every event is a custom post type, so you can use standard template tags to get this information.

    If you check out ourĀ Themer’s Guide, you could probably make a template override to display what you want.

    I believe for your request, you’ll have to override single-event.php, then add <?php the_author(); ?> where applicable.

    Does this make sense? Let me know if this doesn’t work for you.

    Cheers!

    – Casey Driscoll

    #638880
    persyst
    Participant

    Hi Casey,
    I added this:
    <p>Posted by: <?php the_author(); ?></p>
    to the cypherspot.com/wp-content/themes/make/tribe-events/single-event.php

    but only “Posted by” shows up on the event page, no author.

    For example, on this page:
    http://cypherspot.com/event/end-of-the-weak-open-mic/2014-08-17/

    Please help. Thanks

    #640698
    Casey D
    Member

    Hello persyst,

    This might be confusing, but there are two answers to this question.

    Before ‘the_post()’, you’ll need this code or something similar:

    <p>Posted by: <?php the_author_meta( ‘user_nicename’, get_post( $event_id )->post_author ); ?></p>

    If it is after ‘the_post()’, then you can simply use:

    <?php echo ‘Posted by: ‘ . the_author(); ?>

    Does this make sense? Let me know if this doesn’t work for you.

    Cheers!

    – Casey Driscoll

    PS: Make sure your apostrophes are correct! HTML can mess up the code above.

    #641528
    persyst
    Participant

    Hi Casey,
    That worked! Now how can I have the Author name be an active link to the Author’s profile page or a page that lists all event posted by the author?

    #651414
    Casey D
    Member

    Hello persyst,

    That will take quite a bit more customization than I can assist with, sorry!

    It should be easy to implement in the same area, just create a url to the authors page or use more template tags.

    Hope that helps!

    – Casey Driscoll

    #765314
    Brook
    Participant

    Howdy,

    Since this thread has gone for a while without any response, I am going to archive it. If you are still in need of assistance please open a new thread, we will be happy to help. Thanks!

    – Brook

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘How to show who posted event?’ is closed to new replies.