Custom links in the galleries

If you have ever used galleries in WordPress you know that they are created with thumbnails of the selected images, that you can link to the attachment, to the original file or without a link, that shows only the thumbnails as such. [19659004] If you have ever used WordPress galleries, you would have liked to do something like that, right?

You just have to install the WP Gallery Custom Links plugin which, as its name suggests, allows link gallery files to the custom link you want to an external URL, to an entry in your site, wherever you like.

Its use is also very simple. You only have to activate the plugin and from that moment, when you create a gallery you can, in addition to the usual options, link each image to a custom URL, and you can also define if the link will open in a new window or even if you want to maintain effects as Lightbox that you have active (because by default you deactivate them for personalized links).

The result ?, perfect.

HTML5 galleries in WordPress 3.9

WordPress is getting closer to using the standard HTML5 and in the new version, WordPress 3.9 it is already decided that will use HTML5 also for the galleries of images .

Once the change is active with the new update, if you are a developer and want to maintain compatibility with the above you can do it in two ways :

The code to overwrite the parameters of the label described in the second method would be something like this:

The best thing about this second method of adding backwards compatibility is that it also adds forward compatibility, that is, that you can use HTML5 markup in the galleries right now, before WordPress 3.9 comes out .

A simple way to reduce the size of your WordPress

 image sizes

There are many possible elements that can increase the size, weight and load of a web and WordPress ] does not escape from this danger. In fact, there are default behaviors of our beloved CMS that contribute to overload the size of your website .

One of these default WordPress behaviors that contribute to occupy extra space in your installation is ] the management that makes the images you upload . Let me explain …

Every time you upload an image to illustrate an entry, WordPress automatically creates other sizes smaller than the one you have uploaded. The idea is good, do not believe, because it is based on the fact that you do not need to use in your publication the full size of the images you upload resized by HTML (you know, it is pulling or shrinking the image ) but it is better to use a version that better fits the width of your WordPress theme and in the process you reduce the loading time of your cover (especially).

To give an example; imagine that you have a great holiday photo of about 4,000 pixels that weighs 8 Mb. If you upload it to an entry and publish it as is, even if you reduce the size from the object editor, in reality you will be showing fewer pixels width and height but the image will weigh the same when it is displayed on your website, I remind you, nothing less than 8 Mb .

Now add how long it will take to load the cover of your website if you do the same at each entrance of the ¿10? that you show in it. That's it.

That's why WordPress automatically creates small copies of your images, so you use a size more appropriate to the width of your theme and, consequently, also of less weight in " ] megas ".

The idea is good on that side, but it turns out that, at the same time, too is taking up disk space from your highly-appreciated – and usually expensive – web hosting plan , then you will find 3 or 4 more images, which you do not always use.

And, say, if you never use the average size would not it be better to tell WordPress not to create that copy? or the big size, or whatever you want. I do not recommend removing the miniature size, because if you use the galleries is the one you will use.

Getting it is very simple just go on your WordPress Desktop to the side menu " Settings -> Media "and simply set to" zero "the size or sizes you do not want WordPress to automatically create.

In this example of the capture I have removed all sizes except the thumbnails:
 remove wordpress image sizes

Maybe you'll find it too radical, but if you think about it why are you going to upload the 8 Mb photo? Would not it be better to reduce the pixels before uploading it?

Normally, except in places dedicated to photography, it is never necessary to upload images of more size than the one that will normally show your WordPress theme so will not it be better not to unnecessarily occupy the expensive hosting space?. [19659004] At your home I leave the decision, but you know how to do it, and it's easy.

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you:

Drag and drop featured images • WordPress Help

With the news of the image loader in WordPress 3.5 file management has become much easier, let alone the use of galleries, but there seems to be an element that has been left parked: the featured images .

Of course they are integrated in the new image loader but the editor's meta case is a bit useless, just open the loader again for, now, assign a prominent image In short: a waste of time, more in the current times.

A good idea to buy time in this task is offered by the plugin " Drag & drop featured image ". Its function is simple but very imaginative, and above all useful: convert the meta case from " Featured image " in an area of ​​" drag and drop " so you can easily add images from your computer as highlighted.

You can also drag and drop images from the gallery, but you need to launch the image loader, so it's not very useful in this regard.

Include and exclude images from a gallery without plugins

One of the shortcomings that we drag on the WordPress galleries is the inability to insert part of the uploaded images, including or excluding elements of it, or separate the gallery into several parts.

We have already seen how do it with plugins like Nextgen Gallery or Multiple Galleries but there is a way to do it just modifying the shortcode of the same native WordPress gallery.

There is only one drawback, and that is that you can not do it with the order identifier that you put on the images you upload in an entry but with the unique identifier of the attachment, I mean …

Imagine you want to create an entry where you want to show several galleries. Of course, you can do it from the image loader, and then add the shortcode de rigueur:
gallery

What happens is that to exclude images with this method you have to edit the image to see the attachment ID of the same (in no other site shows it to you) and you have to do it from the Multimedia Library, to see the ID in the URL. That is, the sequence would be this:

  1. You upload the images from the imager of the entry in question
  2. Once you upload you access the Multimedia Library and click on the link to edit each image and write down the ID of each one in the URL, or you look at the status bar with the cursor over this link, which also shows you the ID of the attachment.
  3. Add to your entry the shortcode including or excluding images from the gallery

Limitations of this method:

  • You can not put in one shortcode an include and an exclude, only one at a time
  • ] The peñazo that is if you use it habitually

Examples:
gallery include = "8812,8813,8814"

gallery exclude = "8815,8816"

In the above example, if you uploaded the attachments from 8812 to 8816, the result you would get would be exactly the same.

gallery include = "8812,8813,8814"

gallery include = "8815,8816"

In this other example, you have divided the gallery into 2 galleries, one with 3 images and the other with just 2.

Anyway, it's a shame that this is not the case It can be done with the ID assigned to the image loader of the editor, or that the gallery system is not improved to include a simple box to choose which images to load in each gallery, but for the moment we have another option available, without plugins.

Note: this trick is the same for hosted WordPress as for WordPress.com, as you can see in these screenshots …

Note 2: This system has also been applied in this post, showing a separate gallery in 2 parts ]
Note 3: In the shortcodes I removed the closing opening brackets that, of course, you must add ([])

NOTICE : this post is two years or more If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you:

Several galleries in the same entrance Finally!

It seems incredible that something so simple, and demanded, is not included by default in the functionalities of the WordPress image gallery: can insert several galleries .

Until now, if you want ] insert several galleries of images in the same post you had to resort to the plugin Nexgen Gallery with what you have to use an additional system and different from WordPress, or look for imaginative solutions of all kinds.

Well, a plugin has just come out, Multiple Galleries which solves this nonsense of WordPress galleries, and its operation is so simple that it seems incredible that it is not implemented in the default galleries. It's something as simple as ticking a box next to each image in the gallery of an entry to choose which images go in the gallery to insert, then you can insert other images from the gallery doing the same thing. [19659002] Also, if you want you can also use shortcodes .

Automatic lightbox effect in the galleries

One of the things that I like the least about the current versions of WordPress is the mania of to open the images of the gallery on its own page with its corresponding permalink, or on the attached page. Like I'm a maniac but it seems a rather poor way of presenting images.

Perhaps the best way to show images on a website, let alone if it's a photographic theme, is the use of lightbox that nice emergent effect that, without leaving the page, darkens the background and shows you the image at full size and in all its splendor.

Of course, there are many plugins and scripts to include this "lightbox" effect to the images of your site, but where they do not usually act is in the galleries inserted with the WordPress image loader, since they do not act on the 'shortcode' that shows it: [ gallery ] (without the remaining spaces, of course).

Well, we have a solution in the form of a plugin, and the best thing is that you do not have to configure anything, add additional shortcodes or modify the standard of the gallery ; you activate it and it works wonders . This jewel is called jQuery Lightbox for native galleries .

Do you want to see how it works ?, Well nothing, here is a gallery for you to entangle and see how well it goes …

Results of the WordPress 2.9 survey • WordPress Help

A few days ago we proposed to choose the features for WordPress 2.9, and we have the results. To the first question, the only obligatory one, about which function of means to include have won editable photo albums, instead of the gallery per post, and the improvement when inserting multimedia elements (to see if it is true, it is a from my usual complaints)

Then there were other issues. In the second one he has gained the need to improve the incrustation of multimedia elements (in case there was any doubt). More interesting was the fourth question, where it was questioned whether it was better to add these functionalities as a canonical, external plugin or to include them in the core. Do you guess what has been gained? Yes, include it in the core, especially if it involves embedding media.

What seems clear is that the galleries will stop being "by post", and what is still under study is whether the media embedding will be done by shortcodes or as, we will see from here to September.

In the meantime we will see a more multimedia WordPress 2.9, this is for sure, how will it be ?, we have to wait a little bit.

Change the links to the images in the gallery • WordPress Help

One of the novelties of WordPress 2.5 was the introduction of the possibility to insert the images loaded with a post in mode Gallery a list of thumbnails ordered by just entering a code , as we already explained .

Now, the behavior of the inserted gallery is not the most successful from my point of view since when you click on an image of the gallery inserted, instead of showing you the full-size image, it takes you to another page where you can still see the image and, there, when clicking again, it shows you the image in all its splendor.

As you see, nothing smart and a waste of time.

Fortunately, the good of Viper007Bond has had the happy idea of ​​creating a plugin that solves this nonsense that occurred to the WordPress guys. With the plugin Direct Image URLs for Galleries (clearer water) offers exactly what should be by default, that when inserting a gallery the links are opened directly without going through another

Hala, you're taking a while to install it! it's imperative, and I hope you'll soon solve this in later versions of WordPress so you do not have to resort to a plugin for something so obvious.

]

How to use the WordPress Gallery • WordPress Help

In WordPress 2.5 the feature of Gallery allows the possibility of adding a gallery of images to an entry or page of your WordPress blog.

The short code

can be used in an entry or page to show a gallery of thumbnails of images attached to that entry ]offering permanent links for each image separately by clicking on them

It can be used in its simplest form, which is the same as adding it from the Attach Media utility, and it would be this code:

[ gallery ]

But there are several options that can be specified, using this basic syntax:
[ gallery opción1="valor1" optión2="valor2" ]
The basic options included are the following:

Columns (19)

Specifies the number of columns. The gallery will include a jump tag at the end of each row, and calculate the appropriate column width. The default value is 3. If the column is set to 0 there will be no row break. For example, to show a gallery to 4 columns it would look like this:
[ gallery columns="4" ]

Id (id)

Specifies the ID of the entry. The gallery will display the images associated with that entry. The default behavior without an ID is specified is to display the images associated with the current entry. For example, to display the images associated with entry 123:
[ gallery id="123" ]

Size (size)

Specifies the image size to be used to display the thumbnail. Valid values ​​available are "thumbnail", "medium" and "full". The default value is "thumbnail". For example, to show the gallery in medium size you would put:
[ gallery size="medium" ]
There are also other advanced ones available:

Sort by (orderby)

Specify the order used to show the thumbnails. By default they are displayed as "ASC menu_order, ASC ID".

Element label (itemtag)

The name of the XHTML tag used to include each element of the gallery. The default value is "dl".

Icon label (icontag)

The name of the XHTML tag used to include each gallery thumbnail icon. The default value is "dt."

Capture tag (captiontag)

The name of the XHTML tag used to insert each capture. The default value is "dd". For example, to change the sample mode of the gallery and use tags div, span and p:
[ gallery itemtag="div" icontag="span" captiontag="p" ]

Thanks

Note: Extra spaces have been added so that the code does not do strange things

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say that we have not warned you.

Loading …

That may also help you: