How to set post expiration date and time and move the page to archive after expiration [closed]
How to set post expiration date and time and move the page to archive after expiration [closed]
How to set post expiration date and time and move the page to archive after expiration [closed]
query_posts with a custom post type, a meta_query and sorting by post date?
One thing I noticed: Are $daycheck and $currentMonth defined or initiated previously? Also when you created your custom post type did you make sure ‘has_archive’ => true, was included? I would go through and echo out all of your variables and see why January keeps coming up. My guess is that it has something to … Read more
So I finally figured out how to remove the dates displayed on my pages within a google search, turns out there was a hidden span tag on all of my pages that google was using to get the date All I had to do was find the code that added that hidden span tag to … Read more
How to show recent and upcoming birthdays using meta_query
get_queried_object error How to show post count by month in the taxonomy page
Remove DISTINCT And add GROUP BY $wpdb->posts.ID before ‘ORDER BY’
I am not sure without running which query precisely this results in, but I don’t think it is intended format for such query. If you take a look at Date Parameters documentation, there is a special case of after and before when you want to find posts in some direction from specific point.
In your loop while(have_posts() ) : the_post(); you are unconditionally going through all posts, but since the loop stops after the_post() nothing actually happens. So that’s where the condition has to go: while(have_posts() ) { the_post(); if ($daysleft >= 0) { … other actions } } Your code looks a bit incomplete to me, so … Read more
I think that you are using Parsidate plugin to convert dates to Hijri date. The plugin since the current version(2.2.2) returns the published date for both the_date and the_modified_date functions. This is a bug that i reported it to them. For now, you can use the wp-jalali plugin instead, that solved the problem for me.