Determine image height within Fancybox

Finally I came up with the solution to retrieve the image height using PHP getimagesize() and printing it as the ID of the image. Later, in JS I used: var contentheight = jQuery(‘.fluidimage’).attr(‘id’); to retrieve the height and perform the necessary action. Here’s the PHP code: <?php $imageurl = $pathtoimage; $image_size = getimagesize($imageurl); $image_height = … Read more

Ajax page load in wordpress the right way?

Short answer: it’s not possible what you’re asking, in the right way. Because the DOM is changed, the elements that were removed had their events attached on them removed also, so you need to run that javascript again on the new elements. And if you have no control over those plugins and their javascript, then … Read more

Tabbed content for WordPress sidebar

Follow that tutorial and use below code for specific category recent post where tutorial used un order list content. <ul> <?php $recent = new WP_Query(“cat=1&showposts=10″); while($recent->have_posts()) : $recent->the_post();?> <li><a href=”https://wordpress.stackexchange.com/questions/35006/<?php the_permalink() ?>” rel=”bookmark”> <?php the_title(); ?> </a></li> <?php endwhile; ?> </ul> Change cat id and number of post as per your choice.

How to modify iFrame content in an admin thickbox

jQuery(document).ready(function($) { $(‘.yourlink’).click(function() { tbframe_interval = setInterval(function() { $(‘#TB_iframeContent’).contents().find(‘.savesend input[type=”submit”]’).val(‘changed the button text’); }, 2000); tb_show(”, ‘media-upload.php?type=image&TB_iframe=true’); return false; }); }); http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/ you can also enqueue a script on the media upload page that should be available in you iframe, don’t know if that will do it though. am working on something very similar to … Read more

Uncaught TypeError: Object # has no method ‘datepicker’ [closed]

This line shouldn’t be in there: <script type=”text/javascript” src=”http://xxxx/wp-includes/js/jquery/ui/jquery-ui.min.js”></script> In a standard WordPress install, no such file exists. This makes me wonder how you are adding the scripts to the theme in the first place. Are you using wp_enqueue_styles? If not, there is a VERY good chance that you are indeed adding two versions of … Read more

jQuery .load and WP function

Your quick chat function is being loaded to late. It needs to be loaded in the proper WordPress sequence by adding it through a plugin or in functions.php.

Theme has superfish – how to add supersubs?

Have you tried adding this to the themes functions.php? function add_supersubs() { wp_enqueue_script(‘superfish’, get_stylesheet_directory_uri() . ‘/js/superfish.js’); wp_register_script(‘supersubs’, get_stylesheet_directory_uri() . ‘/js/supersubs.js’,’superfish’); wp_enqueue_script(‘supersubs’); } add_action(‘wp_enqueue_scripts’, ‘add_supersubs’); // this assumes the supersubs.js is in the js folder of the main theme directory. You’ll also need to modify the header js to fit supersubs.

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