For Subtract 1 day use this code:
Please replace your date with ‘2012-12-12‘.
$first_date = strtotime('2012-12-12'); $second_date = strtotime('-1 day', $first_date); print 'First Date ' . date('Y-m-d', $first_date); print 'Next Date ' . date('Y-m-d', $second_date);
Related Posts:
- dbDelta support for FOREIGN KEY
- WP-CLI – Selecting PHP version
- Modify previous and next text from pagination links
- Inject post (from specific category) between posts in Loop
- How to correctly submit a search form and display the result in an independent page
- Add a class to links in the visual editor (how to get old dialog back)
- Get meta_id along with meta_key and meta_value
- How to hide get_theme_mod if field empty
- How can merge two arrays values in one array and save in database
- How do i hide the if the appears
- How to handle a custom form in wordpress to submit to another page?
- How to redirect users to custom lostpassword page?
- WordPress 4 invalid username special charachters issue
- How to redirect all 404 in a WordPress subdirectory to the index.php of subdirectory?
- Woocommerce, recognize the loop of related products
- Overriding a theme redux file in child theme
- wp_handle_upload_prefilter valid date from input file
- integrating external php library into wordpress- the right way
- Getting the dropdown menu to redirect to different pages?
- Can an array be used as a meta_query value?
- Making Quote Plugin more efficient
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- Interrupting $html.= ‘ for IF statement
- Store records for a table in wordpress
- Slider loading issue
- WooCommerce Related Products by Attribute
- get current custom post ID by WP_Query method
- add_image_size for header_image
- Must I download entire WP directory for each separate instance/website that uses WP?
- How to complete two other input fields, completed the first
- how do I get a specific post from a post with a subcategory in WP
- Remove from shortcode
- Sort meta-value in the sequence array in pre_get_post
- Dilemma of Populating all the categories in a drop down list
- ‘Post-thumbnails’ feature does not seem to register
- Adding wrapper elements in the_date() like in the_title()?
- Plugin Generate Unexpected output during activation
- How to get post ID in a Page?
- Undefined method class::construct() when creating a plugin
- Why are the details of my todo not saving?
- What does $_GET[‘iphone’] do?
- get_template_directory adding FTP root folders in urls
- How to get User Time Zone in WordPress?
- trying to put an active hover to my custom nav category buttons [closed]
- PHP code for displaying WordPress posts in a static page not working
- How to render a block from php template
- Output: “Array”
- Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]
- woocommerce wc_create_order(); is creating multiple orders instead of one?
- Trying to get property of non-object in WordPress Breadcrumbs
- How can I display Custom Post type Custom Columns and its Content in a Dashboard Widget?
- Proper way to use WordPress function with AJAX PHP file
- Deeper editing of index.php and single.php
- Child Theme’s Read More Text
- Conditionally remove comments and post meta in functions.php
- Replacing WordPress Icons (menu,icons32, etc)?
- How do I call an external php non WordPress class into functions.php?
- Why does PHP called with Jquery AJAX not allow additional php code to be added?
- send popup after wp_redirect()
- How to remove/hide collapse menu for user/subscriber?
- How to work Woocommerce pagination inside shortcode?
- Error establishing a database connection (Set-up locally)
- Integrate admin plugin into template. Very interesant (live search + autocomplete with wp rest api, in vanilla js)
- Hide A Class and Add Custom HTML Code Using WordPress
- Rewrite rule don’t work in wordpress on xamp
- How to translate breadcrumbs
- reset data of an array
- product_type_options get saved value [closed]
- Preserving backslashes in post_content
- Restrict wordpress access to logged users only
- Should I set a page as “No-index” if I include it’s content within the front-Page.php via this method?
- Warning in WordPress for Declaration of SplitMenuWalker::walk($elements, $max_depth) [duplicate]
- Make a full-width wordpress page
- Javascript / PHP – closing the loop
- How to get current post id in gform_field_validation gravity forms
- How to output values from a loop into a javascript array
- How do I wrap this?
- Get user by meta data key and velue
- Logo custom width not implementing
- Custom theme admin-ajax.php 400 (Bad Request)
- WAMP SERVER Command Prompt SET PATH=%PATH%
- How to use get_template_part always relatively to the file I’m using it in?
- Include search tags and users in my search results system
- Display specific main Sub Nav on Woocommerce product pages
- Highlight Single Page Ancestor
- Edit errors on login and lost password screen in wordpress
- Display 6 most recent post on homepage?
- How to call post title and post summary to other part of site?
- How to ‘remember’ a site member’s last visited page?
- append links with unique number string
- Odd page behaviour after removing sidebar
- Create an unique ID number after submit form
- Redirect users not logged in to the standard login page (and back) from some posts and pages
- How to refresh a template page on WordPress in 3 seconds – easiest method?
- redirect user from login page if is logged
- How can I change the URL via add_rewrite_rule()
- Variable ++ in query loop
- How can precision be improved for the debug log timestamp?
- How can I use AJAX in child theme template?
- WordPress critical error after trying to update to 6.2 – Fatal error: Allowed memory size of 268435456 bytes exhausted