Articles Tagged 'functions.php'

WordPress Snippet: Remove the admin bar

The latest version of WordPress has added a new toolbar frontend side when the administrator is logged. If you want to disable this code included in the file functions.php of your theme:

1
2
3
4
/ / Check to see if the filter show_admin_bar
has_filter ( 'show_admin_bar' ) ) { if (has_filter ('show_admin_bar')) {
, '__return_false' ) ; add_filter ('show_admin_bar', '__return_false');
}

Continued ...

Very short trick: WordPress, customize the Meta Box thumbnail

In reference to this Comment : The Metabox thumbnails usually has the title set to "image evidence".

Continued ...

Very short snippet: slideshow 10 lines of code

Let me show you how to implement a simple Slideshow of images with very few lines of code, using jQuery .
This technique can be implemented on any type of website, the important thing is to include the library jQuery . I used this technique to a site built in WordPress , developed in a few hours for an event.

Continued ...

How to set automatic thumbnails of all post

The new feature of the thumbnails in WordPress, which was introduced with version 2.9 and discussed in WordPress 2.9 +: new function, post thumbnails , can be automated through a simple script in PHP. This can be handy when "you forgot" to include thumbnails of each item or if you want to update the previous.

Continued ...

WordPress 2.9 +: new feature post thumbnails

With the latest release of WordPress 9.2 + from, we have introduced a new feature very useful to manage the thumbnails, or thumbnails. This feature, however, must be turned in the theme, namely, acting on the file functions.php . This new feature is useful in many contexts and provides a simple and convenient tool for both the developer of a website using WordPress is the final customer who will then manage the content.
In versions of WordPress prior to 2.9, in fact, many developers used the custom fields (custom fields) to provide customers the ability to add an image - external - to the post. Solution from the point of view that if the developer was not particularly burdensome, RENDEV still editing the post quite inconvenient, especially if we consider that very often is the end customer to treat the contents.

Continued ...

WordPress: filter the content of the comments

I've had to fix an annoying problem on a WordPress blog: users left comments with long sentences. This produced the release of the text, both in the backend, even worse, in the frontend. The effect was really horrible and to avoid hand-to moderate every single comment, the only solution was to filter out - somehow - the output of the comments.

Continued ...

WordPress: extended user information

The information about a user or author of a WordPress blog can be extended easily. This could for example be useful to insert the date of birth, bibliographic information, the address of the workplace or, extremely comfortable, a camp for special permission - to check later in the template.
The operation you are going to do does not require a plugin, but the code you need can be placed in the - usual - file functions.php .

Continued ...

Very short snippet: Wordpress, list categories with checkboxes

A few days ago I released a new major release (the 2.3.0) of the WordPress plugin WP Bannerize , for last year. In addition to having introduced the use of widgets (which I hope to write something in the near future) or "finally" allowed to filter out the banners for class.

Continued ...

WordPress: use shortcodes

From version 2.5 of WordPress (preferably 2.5.1) are available so-called shortcodes , a procedure that allows the creation of callback hooks or rather, when the text of our post is found a string formatted with brackets like [id_shortcode] . Prior to the release of WordPress 2.5 shortcodes were implemented manually (see Napolux ), now you can exploit with more simplicity and for different uses.

Continued ...

Wordpress: functions.php, some useful

Taking up the excellent posts by Francis Gaven WordPress Little Trick - functions.php, and nested comments on the usefulness of the file functions.php present in WordPress themes, here are other useful functions to use for all your themes:

Continued ...