Using an Image Slider twice on the same page

My approach (take it as such) would be simply generating a unique ID which will differentiate each slider. That’s anyway a good practice when the same functionality can potentially be displayed multiple times on the same page. First, find a way to generate an incremental $id to use in your template. Maybe an instanciation ID… … Read more

Storing image gallery plugin data

Depends on what you want to store. The Settings API uses it’s own, well performing, engine behind Tutorial You can (miss)use the Theme modifications API as well Or, if it you’re talking about adding data to posts, you can use the Post Meta Storage Engine Note: “Post Meta Storage Engine” is no official term. I … Read more

How can I show these pictures in two columns in my page?

If it’s a usable option for you, you can change the output of to use <span> tag instead of a <div>. This how you’d change the output (to be added in theme functions.php) of the Caption shortcode: // Source code from http://core.svn.wordpress.org/trunk/wp-includes/media.php add_filter( ‘img_caption_shortcode’, ‘wpse57262_cleaner_caption’, 10, 3 ); function wpse57262_cleaner_caption( $output, $attr, $content ) { … Read more

Disable gallery in 3.5 media iframe

You can disable tabs using a filter hook. Replace wpse_76095_isOurMediaUpload() with however you determine that you’re running the media popup. add_filter(‘media_upload_tabs’, ‘wpse_76095_filterMediaUploadTabs’); /** * filter out unwanted media upload tabs * @param array $tabs * @return array */ function wpse_76095_filterMediaUploadTabs($tabs) { if (wpse_76095_isOurMediaUpload()) { unset( $tabs[‘type_url’], // no linking from external sites (no local image) … Read more

Add data attribute to a gallery link?

This solution will add the data-fancybox=”group” to gallery links produced by the default shortcode. This has been tested and works regardless of whether themes have HTML5 theme support enabled for galleries or not. The solution works by using the post_gallery filter to gain access to the gallery shortcode’s output. From there, the HTML is parsed … Read more

get attributes/part of the gallery shortcode

The task It’s not as easy, as it looks at a first glance. The main problem is, that you can define your own shortcode and simply override the default. Actually that’s what some themes are doing (blame you ThemeForest authors!). In this case, simply hooking into post_gallery won’t work in every case. Drawbacks for post_gallery … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)