Tag: WordPress Tips

  • 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


  • BuddyPress: how to remove rich text on xprofile text area

    Here is a little trick for BuddyPress to remove the rich text functionalities of the editor from the xProfile text areas, like bio field for example. Add this custom code to bp-custom.php to disable the rich text: [code] /*———-*/ /* REMOVE rich text on xprofile text area /*———-*/ function antipole_remove_rich_text( $field_id = null ) {…

    Read more


  • BuddyPress Tip: How to Remove Visual Editor from Text Profile Fields

    BuddyPress Tip: How to Remove the Visual Editor from Text Profile Fields

    Here's a little tip I'd like to share that's very useful on BuddyPress installations: it involves disabling your social network users' ability to use "rich text features" (which include italics, bold, etc.) in multi-line profile fields, such as the "About" field.

    Read more


  • BuddyPress – Create an automatic country dropdown list in profile field

    Are you looking for a function that imports all countries of the world to a BuddyPress profile field called «Country»? This code is for you. Consider that you open an international BuddyPress social network and you want let your users select their country. It's annoying to manually add countries one by one. The solution…

    Read more


  • BuddyPress: Add All Countries to Your Custom Profile Field

    Here's a code that all BuddyPress social network owners have been eagerly awaiting. It's a feature that lets you add all the world's countries at once, rather than manually, to a field labeled "Country," where your network members can select their country. Only…

    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