I'm trying to create a calendar page in WordPress where the user selects the month by a select
:
<select>
<option>Janeiro 2015</option>
<option>Dezembro 2014</option>
<option>Novembro 2014</option>
<option>Outubro 2014</option>
<option>Setembro 2014</option>
</select>
Then the posts are loaded via Ajax. I created a form of type POST
called agenda
and a custom field called agenda_data
.
I need help with two items, the rest I think I can unroll myself.
No select
appear the last 12 months, the WordPress function wp_get_archives
does this. But it returns based on the publication dates and I would like it to be based on the date of the custom field.
A archive.php
that displays the posts also based on the date of the custom field and not the post date of the post.
I did not find anything yet on the internet that could help me.