Changing default WP-Site creation date

There is no blog creation date in WordPress. The first blog post is usually regarded as the blog creation date when you create copyright footer notes for a blog. This is not very reliable though. There are a few thing that happens by default when WordPress is first installed, the most important being a user … Read more

empty query breaks other queries

Before we start, you should properly indent your code and remove php spam. This makes your code much easier to read and understand. Secondly, rather use curlies ({}) instead of syntax like :, endif and endwhile. It is easier to debug and to read. Just another tip, comment your code for future reference, it makes … Read more

Return date in French

Bonjour 🙂 you can use the function date_i18n, e.g. like this $dateToDisplay = time(); echo date_i18n(get_option(“date_format”), $dateToDisplay); look in the codex for more informations https://codex.wordpress.org/Function_Reference/date_i18n

Shortcode is not returned correctly

You should not echo any content in your shortcode. the_weekday() function echos the date. You can use output buffering or directly get the date: Output buffering: function custom_shortcode() { ob_start(); the_weekday(); $week = ob_get_contents(); ob_end_clean(); return ‘<img src=”https://wordpress.stackexchange.com/wp-content/themes/coworker/images/daily-social-image-” . $week . ‘.gif” width=”100%” />’; } add_shortcode( ‘weekday’, ‘custom_shortcode’ ); Or use the global $wp_locale to … Read more

Unique Problem with the php date and get_posts

date returns a string but you are using integers in the switch statement. Use: case ’01’: $dateY = date(‘Y’)+1; break; etc. However, the switch code can be much simpler, and there is no need to call the date function again since dateY has already been initialised in advance: switch($dateM) { case ’01’: case ’02’: case … Read more

Convert Gravity Form Entry Date on Export

You can’t modify date_created on Export Gravity Forms date_created field isn’t actually a field that’s affected by that hook. If you look in /exports.php you’ll find in start_export() that they bypass the filter for ID’s date_created and payment_date and hard-code force the use of Y-m-d H:i:s foreach ( $leads as $lead ) { GFCommon::log_debug( __METHOD__ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)