Category: Snippets

  • Snippet WP: remove the WordPress menu from the top admin bar

    Snippet WP: remove the WordPress menu from the top admin bar

    Here's a little PHP function that lets you remove the small WordPress logo from the admin bar, thus freeing up some space at the top of a WordPress blog's admin area: // Remove WP logo and WP dropdown menu from top admin bar function admin_bar_remove_logo() { global $wp_admin_bar; $wp_admin_bar->remove_menu( 'wp-logo' ); }…

    Read more


  • Change the Default Excerpt Length in WordPress

    Change the default excerpt length in WordPress

    The WordPress excerpt via the `the_excerpt()` function is a brief summary of a post from your WordPress blog that appears wherever it is called, typically on archive pages (categories, tags, author pages), search results, and in some cases, on your site's homepage, but also in the RSS feed and…

    Read more


  • WordPress Snippet: display custom text after the title of an article in a specific category

    WordPress Snippet: Display Custom Text After a Post Title in a Specific Category

    Quick reference: Here's a short code snippet to add to your functions.php file to display a small text tag right after an article's title if it belongs to a specific category. This is useful, for example, when you want to emphasize that the article belongs to a particular category. I…

    Read more


  • How to integrate a Google Analytics tag by domain with WPML

    How to integrate a Google Analytics tag by domain with WPML

    Hello everyone! I had a bit of trouble inserting the famous Google Analytics tracking tag on multilingual sites using the WPML plugin, so I'm sharing this little hack with those of you using WordPress that will give you a quick solution. Indeed, to integrate a Google Analytics tag by…

    Read more


  • Create a shortcode for the permalink of a WordPress article

    Create a shortcode for a WordPress post's permalink

    I needed to create a shortcode to display the link to a WordPress post. Here's the code I added to my functions.php file: [code] add_shortcode( 'my_permalink', 'my_permalink' ); // The Permalink Shortcode function my_permalink() { ob_start(); the_permalink(); return ob_get_clean(); } [/code] And then all I had to do was use the shortcode…

    Read more


  • WordPress: display users by registration date

    Here's a very useful WordPress plugin for those who manage WordPress sites with regularly joining members – especially those using BuddyPress – and who need to see who the most recent members are. Indeed, the users page in the WordPress dashboard displays a list in alphabetical order, and it's not…

    Read more


  • How to add a custom font to a WordPress theme with @fontface CSS3

    How to add a custom font to a WordPress theme with @fontface CSS3

    Declaring a custom font in your WordPress theme is very useful for personalizing it and adapting it to your brand guidelines. However, sometimes the font of your dreams isn't available in your theme options, nor on Google Fonts or TypeKit. In that case, you'll have to get creative…

    Read more


  • Create a new personalized RSS feed in WordPress

    Create a new personalized RSS feed in WordPress

     Here is a very useful piece of code that will allow you to create a new RSS feed in WordPress.

    Read more


  • WordPress tip: put images in the RSS feed

    WordPress tip: put images in the RSS feed

    Here is a very simple code which will allow you to insert your featured image in your RSS feed, so that, when you relay your feed on a social network like Facebook for example, the image can accompany the title and the presentation of your post.

    Read more


  • Change WordPress Default Sender

    Quick tip for WordPress CMS users who are tired of seeing the wp_mail function send automatic messages to their users under the email " «"Unfortunately, there are no settings in the WordPress backend to address this issue. Therefore, here's a small filter found on Butterblog.com, the author of the WP-Members plugin…"

    Read more