Jquery plugin not working on single pages

Your Theme is enqueueing jQuery 1.7.2: <script type=”text/javascript” src=”http://dayfun.ir/wp-content/themes/Sparks/lib/js/jquery.min.1.7.2.js”></script> And WordPress is enqueueing jQuery 1.8.3: <script type=”text/javascript” src=”http://dayfun.ir/wp-includes/js/jquery/jquery.js?ver=1.8.3″></script> See also, Frank’s answer regarding jQuery no-conflict mode. Edit WordPress bundles a version of jQuery. You will inevitably encounter problems if your Theme (or a Plugin) enqueues a separate version of jQuery – whether by enqueueing that … Read more

ACF: post query, hide duplicate values [closed]

You could pass all the fields into an array during your while loop, strip the array of duplicates, and then run a foreach loop on that array. It would look something like this: <?php $designers = array(); while ( $the_query->have_posts() ) : $the_query->the_post(); $designers[] = get_field(‘products_page_designer_name’); endwhile; // This will strip out any values that … Read more

Add custom text color WordPress 3.9 TinyMCE 4 Visual editor

Aleksandar Urošević addressed this specific scenario (which is different than adding a button, as you’ve noted). This is the WP 3.9 approach: function mytheme_change_tinymce_colors( $init ) { $default_colours=” “000000”, “Black”, “993300”, “Burnt orange”, “333300”, “Dark olive”, “003300”, “Dark green”, “003366”, “Dark azure”, “000080”, “Navy Blue”, “333399”, “Indigo”, “333333”, “Very dark gray”, “800000”, “Maroon”, “FF6600”, “Orange”, … Read more

Stop WordPress processing Javascript as text

The post editor is really not meant for inserting functional code like JavaScript into the page. Anything you put through the post editor will get run through wpautop() before output, which is what adds the paragraph tags — even if you enter it via the Text mode. I’d suggest outputting your JavaScript via a hook … Read more

Hack-Proof OR Security in WordPress — is it real?

But recent months, several sites of my clients were hacked and I’m concerned about this problem. In my experience pattern of hacks in quick succession indicates a common link. Typically it is vulnerable plugin/theme or incompetent hosting. If you do not consider the option of password brootforcing, how hackers can get access to the file … Read more