Fancybox plugin: triggering on href attribute

jQuery(‘a[href^=”http://www.everytrail.com/view_trip.php?trip_id=2027383″]’).fancybox({ Try this. <script type=”text/javascript”> jQuery(document).ready(function($) { jQuery(‘a[href=”http://www.everytrail.com/view_trip.php?trip_id=2027383″]’).fancybox({ ‘transitionIn’: ‘elastic’, ‘transitionOut’: ‘elastic’, ‘speedIn’: 600, ‘speedOut’: 200, ‘type’: ‘iframe’, ‘height’: 800 }); }); </script> I checked on my DEMO, and it works for me Make sure your site already load jQuery : if there is no jquery.js loaded, use the following code to load <?php wp_enqueue_script(‘jquery’);?> … Read more

Next Previous Post in wordpress with previous / next link with title?

You can do it like so, I guess: <div class=”alignleftfp”> <?php next_post_link(‘%link’, ‘<img class=”imgalign” src=”‘ . WP_CONTENT_URL . ‘/uploads/1.png” alt=”Next” /> %title’); ?> </div> <div class=”alignrightfp”> <?php previous_post_link(‘%link’, ‘%title <img class=”imgalign” src=”‘ . WP_CONTENT_URL . ‘/uploads/1.png” alt=”Next” />’); ?> </div> PS. You shouldn’t use next_post/previous_post functions – they’re deprecated. EDIT Just read the_content filter docs. … Read more

“switchEditors is not defined” with wp_editor() in jQuery UI tabs

I have tackled this by putting TinyMCE on the first tab, and making it a static tab, all others are still ajax, would still like it to be ajax, if anyone has any solutions. <div id=”tabs”> <ul id=”wpsca_ul”> <li><a href=”#wpsca_addedit” title=”add page”><?php echo __(‘Add Page’,’wpsca_lang’);?></a></li> <li><a href=”https://wordpress.stackexchange.com/questions/106799/<?php echo get_option(“siteurl’ ).’/?wpsca=wpscalist’;?>” title=”manage addedit”><?php echo __(‘Manage Pages’,’wpsca_lang’);?></a></li> … Read more

Output after specific post in the loop

Unfortunately there’s no purposely provided hook available for this. The only hooks inside the loop are triggered at the start and the end of the hook. There is the_post action, but this is probably far too generic to use (may cause undeseriable side effects) and is called a the wrong point for example: The function … Read more

WPDeals Add custom currency

Took me a while, but I found the solution. I decided to write a blog post on it. http://readmystuff.wordpress.com/2013/07/23/how-to-add-a-new-currency-to-wpdeals-the-real-way/

Error: Can´t access facebook comment plugin admin page

I had to change the plugin file to make it work. I think it can help someone and even the plugin’s author should consider making these changes. on class-admin.php, create this function at the beggining (can be line 9): function loadXmlByCurl($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xml = … Read more

Development workflow for WordPress using git – issues with plugins and bloginfo(‘wpurl’)

bloginfo/get_bloginfo use site_url to retrieve the wpurl value, site_url provides the site_url filter, so you should be able to use that filter to alter the output. function alter_site_url_wpse_107701($url) { return str_replace(‘/core/wordpress’,’/core’,$url); } add_filter(‘site_url’,’alter_site_url_wpse_107701′); I am guessing a bit at exactly what you need to replace, but I think that is close.

WordPress “Add new tag” button is not working

I’ve had similar problem, maybe it’s not js issue, but XML instead. Check if there are white spaces at end of the files involved ( after the PHP closing tag “?>”) Hope it helps! UPDATE maybe ajax cross domain issue ( 307 Temporary Redirect ) last chance: Set this entries on your .htaccess file SetEnvIf … Read more