Skip Navigation

[Resolved] How to create author and date archive links on a post?

This thread is resolved. Here is a description of the problem and solution.

Problem:
When displaying a post, how to generate author archive link and date archive link?

Solution:
The wpv-post-author shortcode can take a format='link' attribute which will add a link to the post author archive.

<br />
<a href='[wpv-bloginfo show="url"]/[wpv-post-date format="Y/m/d"]'>Date archive</a><br />

Note that the date archive will not include custom post types by default. You would need to create a custom archive and specify the post types to be included.

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-author

This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by justinB-3 6 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#617190

In a post's footer we display the post date and post author. We would like to click either of these and be taken to their respective archive pages...the post archive page for that specific post date, and the post archive for that specific post author. I looked thru all the Views field documentation and didn't see anything that would do that.

The date archive would have a URL like ten8fire.com/2018/02/18/, and the author archive would have a URL like ten8fire.com/author/authorname/.

The original blog page which has these features working is at hidden link.

#617317

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Justin

The wpv-post-author shortcode can take a format='link' attribute which will add a link to the post author archive (https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-author).

You would need to construct a link to the date archive, like so:

< code>
Date archive
[/php]

Note that the date archive will not include custom post types by default. You would need to create a custom archive and specify the post types to be included.

#617954

This worked perfectly, thank you.