Home › Forums › Calendar Products › Events Calendar PRO › How to show who posted event?
- This topic has 6 replies, 3 voices, and was last updated 11 years, 7 months ago by
Brook.
-
AuthorPosts
-
August 7, 2014 at 1:46 pm #607044
persyst
ParticipantHow do I include the username of the user that posts an event in the event page?
August 8, 2014 at 10:30 am #617130Casey D
MemberHello 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
August 11, 2014 at 6:55 am #638880persyst
ParticipantHi Casey,
I added this:
<p>Posted by: <?php the_author(); ?></p>
to the cypherspot.com/wp-content/themes/make/tribe-events/single-event.phpbut 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
August 11, 2014 at 10:55 am #640698Casey D
MemberHello 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.
August 11, 2014 at 12:52 pm #641528persyst
ParticipantHi 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?August 12, 2014 at 9:53 am #651414Casey D
MemberHello 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
September 24, 2014 at 10:34 pm #765314Brook
ParticipantHowdy,
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
-
AuthorPosts
- The topic ‘How to show who posted event?’ is closed to new replies.
