воскресенье, 10 февраля 2013 г.

галерея по url wordpress

Important Note: Keep in mind that this plugin uses and overrides the core gallery function. Future WordPress versions could break this plugin, although it has lived through several. I’ll try to fix this plugin as soon as possible if it does break from an update. Leave a comment here or on Github in the event that it does break.

One last change to get the gallery to start showing your new custom link. Go to the HTML tab of the WordPress Wysiwyg and change the gallery shortcode link attribute to “custom”. IMPORTANT: the previous version of this plugin used the link value of “custom_url”, this has changed!

After you have installed this plugin, upload a few images and add a gallery to your page. Edit that gallery and you can see the new text field we have added. Here is a before and after:

I read a few blog posts looking for this solution, one or two steered me in the right direction. Forgive me for not linking to those sources as I cannot remember how I found them.

By default each of your gallery images either have no link, file URL, or post URL. You can see this by viewing the images you have attached to your page. What if you wanted a custom link for each image in your gallery. This would be helpful if you wanted a gallery image to have an outbound link or link to a page on your site.

Now a WordPress plugin on Github:ВP ВP- This post has been updated now that the code is on Github.

Add a Custom URL to your WordPress Gallery Images

A collection of code, insight, tips & tricks. Mostly on design, jQuery, WordPress, Drupal, Rails, & the occasional random thought.

Add a Custom URL to your WordPress Gallery Images « Geekee Media

Комментариев нет:

Отправить комментарий