Code for post author, publish date, categories, tags, etc

I disabled the “.entry-header” class in my theme because the title and meta information didn’t display as I wanted and where I wanted (really annoying that turning off the post title is not an option). However, I want to be able to display my author, publish date, categories, etc.

What code do I need to add to display this?

Currently I have put By <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y'); ?> in <?php the_category(', '); ?> <?php edit_post_link(__('{Edit}'), ''); ?> into the “raw content” element, but the PHP code doesn’t display anything, it just shows all words that aren’t code (“by”, “on”, “in”)

please help

Hello Matt,

Thanks for writing in!

Please be advised that the Raw Content element will only accept plain text, CSS, JS and HTML code. It will not render any PHP code. What you need to do is to use Text element and insert the following code which has the dynamic content codes in it.

By <a href="{{dc:author:url}}">{{dc:author:display_name}}</a> on {{dc:post:publish_date}} 

To display the categories, you need to use the Terms elements next to the Text element above. If you are not familiar with the dynamic content or the Terms element, please check out this documentation first:

Kindly let us know how it goes.

1 Like

Thank you Rue, that worked perfectly!

Hey Matt,

You’re welcome! If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.