how to get URL date(year/month/day) in WordPress in case DAY and Name is selected in permalinks settings

1.3k views Asked by At

I have a wordpress page where it's URL is http://localhost/MyWebsite/news/2018/10/ and I want to get the date from this URL in case I choose plain option in settings > permalinks it give this kind of url http://localhost/stormhounds/?p=123&m=201811 so I can access this date through get_query_var('m') function but since I chose Day and name in settings > permalinks I can't use this funtion to get the date. So any other way to get that date

0

There are 0 answers