Add Lightbox To WordPress Native Gallery

By default there is a difference in the HTML output for images inserted alone or via . A direct image link will output an <a href=””> to an actual image mime type, like: <a href=”https://wordpress.stackexchange.com/questions/119659/some-image.jpg”> An attachment <a href=””> outputs an attachment URI like: <a href=”https://wordpress.stackexchange.com/questions/119659/some-link?attachment_id=126″ or ../attachment/2013/ As for a filter I don’t think … Read more

PHP mixed with some JS code to update WordPress theme settings

The way I see, you could minimize code mixing storing the return value of get_theme_option(“bg_slideshow”) into a JS variable, although it would not solve the problem as whole: var themeOptBgSlideshow = <?php echo get_theme_option(“bg_slideshow”); ?>; if(themeOptBgSlideshow == 1){ /* Background Images */ var bg_slideshow = jQuery(“.bg_slideshow”).attr(“data-active”); if(bg_slideshow == 1) { jQuery.vegas(‘slideshow’, { delay: 8000, backgrounds:[ … Read more

How i can widget ID get after drag for wordpress with jquery?

My jquery function working perfectly in sidebar :). Jquery Enable after Dragging widget in sidebar . jQuery( document ).ajaxComplete( function( event, XMLHttpRequest, ajaxOptions ) { var request = {}, pairs = ajaxOptions.data.split(‘&’), i, split, widget; for( i in pairs ) { split = pairs[i].split( ‘=’ ); request[decodeURIComponent( split[0] )] = decodeURIComponent( split[1] ); } if( … Read more

Passing a varible from jQuery to PHP

First, don’t use query_posts. Second… I think this can be done with AJAX but is there a more simple method and give me a clean URL? PHP runs on the server. Items are “clicked” on the client machine. The only way to pass that “clicked” value back to PHP is via AJAX. Within a WordPress … Read more