trying to modify colormag-fr_FR.po

Just modifying the .po file doesn’t do anything. The .po is the template. To be displayed, the .po must be compiled into an .mo file and it is the compiled .mo that makes the translations. If you’re just editing the .po in a text editor, you’re not changing anything. You’ll need a compiler. A good … Read more

WordPress Network Feature

What you describe it pretty much exactly the use-case for WordPress Multisite (formerly WPMU.) The downsides are of course that all sites are dependent on the same code and the same database so if you break one you break them all (though most of the tables are different for each site.) Of course the upside … Read more

Error upgrading from 2.9.2 to 3.0.1

I also used SVN before to update my wordpress installation. Up the working copied will get messed up very quickly with all the manual updates or files created by plugins. I would always recommend to use the update functionality of wordpress if you only want to step from one tagged version to another one. Although, … Read more

Schedule cron event from widget

wp_schedule_event takes a hook as parameter, not a function. Try: wp_schedule_event(time(), ‘daily’, ‘my_daily_event’); add_action(‘my_daily_event’, array(&$this, ‘my_widget_cron’)); if ( !wp_next_scheduled( ‘my_daily_event’ ) ) { wp_schedule_event(time(), ‘hourly’, ‘my_daily_event’) } If you remove the widget from the sidebar, the cron will still continue to run. You can run the following code (outside of the widget class) to clear … Read more

Best way to pass arguments to another page in WordPress

Use add_query_arg() to do this. Here’s a useful function if you need to get the current page URL (when get_permalink is inaccesible, like on Archives): function get_current_page_url() { $request = esc_url($_SERVER[“REQUEST_URI”]); $pageURL = (is_ssl() ? ‘https’ : ‘http’).’://’; if ($_SERVER[“SERVER_PORT”] != “80”) $pageURL .= $_SERVER[“SERVER_NAME”].”:”.$_SERVER[“SERVER_PORT”].$request; else $pageURL .= $_SERVER[“SERVER_NAME”].$request; if (false === strpos(get_option(‘home’), ‘://www.’)) $pageURL … Read more

sanitize attachment filename

Following on from question comments. You can run a filter on sanitize_file_name_chars and add the degree symbol to the array of invalid chars, but it won’t halt the upload it will simply strip the file extension. However you can add another filter stop the upload, in a hacky kind of way by additionally hooking on … Read more

Custom Dashboard Home Screen Options

Replacing the dashboard and adding to the current one are both accomplished with plugins. Fortunately, some pretty smart folks have already figured it out for us… To completely rewrite the Dashboard, you’ll need to create a new page and redirect requests to the built-in dashboard page to your custom one. Fortunately, someone has already figured … Read more

Customize in category page

Review the template hierarchy from the Codex to gain a better understanding of what files are read when. This will help you to understand what’s called in what situation (tag/category/front-page/etc). Content.php is never mentioned in the documentation as its not a part of the template hierarchy. Theme developers will use different file names and will … Read more

Disable email field on WooCommerce customer account details

You can do it by adding this code to functions.php: function custom_override_checkout_fields( $fields ) { unset($fields[‘billing’][‘billing_email’]); return $fields; } add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’, 1000, 1 ); But it is wrong approach, since WooCommerce uses email to notify user about status of the order.

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