PHP `iconv` not working inside a WordPress site

To solve this problem I need to insert this instruction BEFORE iconv: setlocale( LC_ALL, “pt_BR.UTF-8”); Thus, the conversion is done correctly (in my case, because my site is in pt_BR): <?php $filename = “ação”; setlocale( LC_ALL, “pt_BR.UTF-8”); // fix the locale $filename = iconv( ‘UTF-8’, ‘ASCII//TRANSLIT’, $filename); // convert latin characters echo $filename; // shows … Read more

display custom plugin view on front end inside template body

In your plugin class (e.g. MyPlugin), add public static function, returning some content: public static function my_plugin_output() { // Build your content $output=”<div>”; $output .= ‘This is a text to display.’; $output .= ‘</div>’; return $output; } Once your plugin is activated, add this line to any template, you want the plugin content to appear: … Read more

Changing Date Format on Custom Meta Data w/shortcode call

Try with change line to date(‘d-m-Y’,strtotime($current_user->delivery_date)) ; function delivery_date( $atts ) { global $current_user, $user_login; get_currentuserinfo(); add_filter(‘widget_text’, ‘do_shortcode’); if ($user_login) return date(‘d-m-Y’,strtotime($current_user->delivery_date)) ; } add_shortcode( ‘delivery_date’, ‘delivery_date’ ); echo do_shortcode(‘[delivery_date]’);

WordPress PHP version

You can check your .htaccess file. WordPress will check if you have this line: # Use PHP 7.3 as default If it’s not the latest PHP version (i.e PHP 5.6), even if you are running the latest version on your host, your dashboard will show that warning.