How to display additional contents on archive page?
-
I want to display some additional contents on monthly archive pages. The tricky part is, for every month, the addtional contents are different, sometimes it is a chart, sometimes it is a picture, sometimes it is an accordion content, sometimes it is several addtional posts(not from the month).
Is there a nice way to do this?
The only thing I can think of is hacking archive.php and then add a long switch .. case code block, something like
switch ( month ) case '2022-08': echo do_shortcode('[elementor-template id="74"]'); case '2022-07': echo do_shortcode('[elementor-template id="73"]');
Alternatively, I can create categories for each month, and then use advanced custom fields to add month related content to custom fields, then display the fields also by hacking archive.php.
Is there any other better way to do this?
- The topic ‘How to display additional contents on archive page?’ is closed to new replies.