remove author and date from all posts [closed]

For those who have the same issue, I solved it by doing the following: Within Apparence -> Customize -> Blog Post Options -> uncheck “post Date” uncheck “post Author” These settings, removed the author and date from the post. Then, commenting the following line from single.php /*$cmsms_post_author_box = get_post_meta(get_the_ID(), ‘cmsms_post_author_box’, true);*/ And then, I’ve changed … Read more

wp_date doesn’t work

I was able to make my local WP installation display the date in French: switch_to_locale( ‘fr_CA’ ); echo wp_date( ‘F d’ ); Output: octobre 11 (Note that I didn’t have to localize my date format string (ie, no __() inside the wp_date() call.) However, when I tried Dutch: switch_to_locale( ‘nl_NL’ ); echo wp_date( ‘F d’ … Read more

the_time() cannot be placed correctly

<p> <?php the_time() ?> </p> It helps with separation of concerns and increases readability of code as well as being consistent with WordPress coding standards and the default coding style. The first method you attempted is completely invalid, the_time() only accepts 1 parameter, the date format. The second method has roots in validity, but the_time() … Read more

Get system timestamp in wordpress

You can use PHP’s date() function here, but usually first you’ll need to run date_default_timezone_set. UTC+1 looks like Central Europe time from what I can tell, so here’s what I’d run: <?php date_default_timezone_set(‘Europe/Berlin’); echo date( ‘D, d M Y H:i:s’, now() ); ?> That will print out the current time from your server. If you’re … Read more

Use esc_attr() to print month name in French

Here is my solution, which has been tested and works: // Timestamp to format (defaults to current time) $timestamp = time(); // Set language code $dateformat = new IntlDateFormatter( ‘fr_FR’, // Use valid Locale format IntlDateFormatter::LONG, IntlDateFormatter::NONE ); // Set date format $dateformat->setPattern(‘MMMM’); // Echo (and capitalize) formatted timestamp echo ucfirst( $dateformat->format( $timestamp ) ); … Read more

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