Reorder displayed posts with JQuery (title A-Z / last posted)

With WordPress you can utilise a function called wp_localize_script() which allows you to pass in a script, and a variable you would like that script to have access too. Perhaps by assigning the new query to a variable, and then accessing it within jQuery would help you solve your problem. The example provided by WordPress … Read more

Getting all URLs of uploaded images using media uploader

Got it working with a code from this question https://stackoverflow.com/questions/14847668/get-url-of-freshly-uploaded-image-from-wp3-5-media-uploader Maybe somebody will find it useful. This code logs URL of every freshly uplaoded image to console. jQuery(document).ready(function($){ $(‘#upload-btn’).click(function(e) { e.preventDefault(); var image = wp.media({ title: ‘Nahranie obsahu’, // mutiple: true if you want to upload multiple files at once multiple: true }).open() .on(‘select’, function(e){ … Read more

Getting post meta in the flex slider

It’s a bit tricky to provide the solution that would work for you without full HTML. I’ve checked the linked page, but there’s no pagination there (I’ve searched for flex-control-nav that you mentioned and didn’t find it). So my solution comes from the code that you provided and from the HTML that I’ve seen on … Read more

Ajax not posting form data to query in PHP function

I have probably found the problem (after our little discussion). For me it looks like the $postcode isn’t send. Check the “Headers” tab from you screenshot – there would be info about the POST variables that were or weren’t sent. If the $postcode isn’t send, you get from the query probably the codes that are … Read more

Is it possible to hide media details sidebar when wp.media popup is being opened?

Ok, It’s been so long since I posted this question I totally forgot about it. I finally used popup.on( ‘open’, function() {…}); to remove left modal sidebar. Here we go: popup.on( ‘open’, function() { jQuery( ‘.media-frame-menu’ ).remove(); jQuery( ‘.media-frame-router, .media-frame-title, .media-frame-content, .media-frame-toolbar’ ).css({‘left’: 0}); }); That’s it 🙂 EDIT I managed to hide right hand … Read more

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