This can be solved with hundreds of plugins, but I’m happy that someone wants to make it with code.
So that you want is actually not to hidden something but to just take the posts after the one month ago date.
$onemonth_before = date( 'Y-m-d',strtotime('-1 month') );
$args = array(
//if you have custom post type
'post_type' => 'your-post-type',
'posts_per_page' => 20,
'post_status' => 'publish',
'tag' => 'sometag',
'date_query' => array(
'after' => $onemonth_before,
'inclusive' => true,
),
);
$query = new WP_Query( $args );
This maybe needs some changes to work in you case.
Some more info about the powerful date_query can be found in the
codex
Related Posts:
- Exclude from the query posts with meta_key and meta_value
- Add options to featured image
- mysql custom wp query
- Change meta tags programatically
- Use a function to update post meta based on other post meta
- update_post_meta for custom field not working upon form submission
- WordPress – thumbnail image from youtube (function and loop)
- Assign category using custom field?
- Convert User ID’s to User Names in a single.php file
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Move Post to different category if post_meta field is 0 or is 2 days old?
- What WordPress function to use to get meta value by using meta keys?
- show first 3 thumbnails of posts in different sizes [closed]
- Default Custom Field Value Automatically Update
- Post meta not updating
- Function to update post_meta based on existing post_meta
- How to obtain the recent posts without their content in an efficient way?
- Prevent custom field from being updated after first publish
- Get array of metakey in all posts
- User function to return multiple get_post_meta()
- What are the meta fields for an attachment?
- Using functions.php to include code that’s processed inline
- Getting images from media library and get_the_date() not working
- How to avoid saving empty data to sql while using add_meta_box
- How to change text color depending on the number value (Using javascript)
- How to add custom metakey to shop_order page’s searching function?
- Update wp_postmeta table based on 2 keys
- blank page with wp_get_attachment
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- Creating a “Related Meta” type field?
- save_post doesn’t correctly process function call with php class
- Pagination not working on my archive page for a custom post type
- Return ACF Field value function
- update_post_meta not working in function
- How To Get WordPress Categories Last Update Date?
- How to add a meta information to the URL?
- Automatically add custom fields (post_meta) to all published posts, hourly, via wp_cron?
- update_post_meta after form is submited
- Add custom fields after post/page title
- Display post_meta-by_key on product catalogue
- Integrating custom API for post content into Admin interface & Public Website [closed]
- How to save custom made object in an array in a post meta field
- Adding and updating repeating custom field meta data
- Get the ID of the page a menu item links to?
- Add container to nav_menu sub menu
- One Child Functions.php for Multiple Child Themes
- Disabling pingback and trackback notifications
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- How to get comments with mixed status using get_comments?
- How can I rename the WordPress AJAX URL? [duplicate]
- How to add a rel attribute to images that contains their categories?
- Is it possible to be more page/post specific with admin_enqueue_script?
- Add external js file to footer with id
- How can I enable uploading excel files?
- How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?
- Twentyten Child Theme: header images display messed up in admin panel
- Access post meta in future_to_publish function
- Get Current Post ID in functions php, meta query filter
- Force the “Choose from the most used tags” meta box section to always be expanded
- Move Custom Fields on General Settings Page to New Location
- Remove adjacent_posts_rel_link under 3.2?
- Limit dimensions of “Full” size images
- Where to put random functions?
- Define PHP variable from a seperate API if statement
- Auto-Tweet if Type is ‘Status’ using OAuth
- Output a specific link in WordPress post if the single post’s category’s name contain certain word
- How to add custom li item to wordpress menu
- Passing user enetered value in widget: number of words, for example
- How to store a number (coming from cookie) into query vars for later usage in other filters?
- Suggest Users basing on User taxonomy
- Code to insert code into single php
- Custom Image Size in Insert Media
- Custom function for search form
- Custom Menu in Admin doesn’t change menu in browser
- How can I show different content for different user-levels?
- WordPress function bloginfo not echoing output on parts of the pages
- How to change a meta value (of a published post) after X days.?
- wp_nav_menu displaying all pages
- Why should I use get_template_directory() when include files?
- How to display an image before title text in menu items
- How to replace ACTION url from original wordpress login form?
- Redirect User Role When on Specific Page
- How to force one script to load before google tag manager script
- I can’t in any way include css in my theme using functions.php
- Problem with email function
- admin-ajax.php 403 forbidden only when calling from external file
- Custom download page
- How to include a hyperlink in the body text of a custom password protected form?
- Get title from IDs in a string
- uninstall a theme programmaticlly
- Update add_image_size
- How to get only current images of a post
- Function to get the name in database table from the comma separated string
- Limit length of headline in Editor
- Way of getting queried loop before the query with a filter hook?
- Why my wp_enqueue_script doesnt work on some page?
- Need to use an external variable inside a function
- Trying to get this function to show below the content
- Using input_attrs() Multiple Times Within One Customizer Control