How to get the get the select values created by ACF plugin in wordpress

In this bit of code: $field = get_field_object(‘field_51d3f9c3f5554’); $field[‘choices’] will contain an array of the available choices for that field, not the currently selected value, $field[‘value’] contains the currently selected value. However, using get_field_object when all you want is the currently selected value is unnecessary. for the correct use of get_field(), read the documentation carefully … Read more

How to use existing hook in twentytwelve to all theme of wordpress?

A hook can only be implemented via actual function call. It is not possible without adding that call to theme template directly or via other method (calling it inside another, already available, hook for example). There is Theme Hook Alliance initiative to promote more standardized hooks in themes and increase flexibility, but adoption have been … Read more

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