How to prevent Google adsense invalid impressions while performing admin tasks on my wordpress site?

The advertisements are only displayed on the Front-end of your site (whatever the visitors see). Since the ads are only displayed on the front-end, you don’t have to worry about generating invalid impressions by reloading your admin page, creating posts, etc. So long as you don’t open your website’s front-end area and start reloading like … Read more

Make title bar collapse when scrolling

Malina is a Premium ThemeForest theme, have not used but can give you an overview. Hope this helps. Most of the premium ThemeForest themes come with Theme setting which you can find under Appearance -> Themes -> Theme setting. There are multiple options for choosing a header with the layout we want. You can choose … Read more

How can i edit all posts slug in bulk keeping WP native redirect?

This is what worked for me: function remove_false_words($slug) { if(!is_page()) if (!is_admin()) return $slug; $keys_false = array(‘unwanted’,’word’); $slug = explode (‘-‘, $slug); $slug = array_diff($slug,$keys_false); return implode (‘-‘, $slug); } add_filter (‘sanitize_title’, ‘remove_false_words’); Then you can use wordpress dashboard to select all posts, bulk edit, Update. And the words will be removed from slugs with … 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