Managing advertising code snippets
Managing advertising code snippets
Managing advertising code snippets
I got it solved…. function filter_image_send_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt) { $animatedGif = (bool) get_post_meta($id, ‘animated_gif’, true); if($animatedGif){ $gifCoverImgUrl = get_post_meta( $id, ‘animated_gif_cover_url’, true ); // build my GIF player if(isset($gifCoverImgUrl) && $gifCoverImgUrl != ”){ $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXPath($doc); $src = $xpath->evaluate(“string(//img/@src)”); $html=”<img class=”gifplayer” src=””.$gifCoverImgUrl.'” data-gif=”‘.$src.'” />’; … Read more
This kind of questions is better asked on StackOverflow community. Maybe this JS hack would help: var elem = document.querySelector(‘.search-form input[name=”search_keywords”]’); if ( null !== elem ) { elem.onchange = function() { var e = this , v = e.value; if ( ! v ) return; v = v.toString(); if ( 0 === v.indexOf(0) ) … Read more
For editing content, I used the plugin Advanced Custom Fields. As for the conditionals, I just added if (is_page_template(‘template_name.php’) before each wp_enqueue_script.
You can pass a priority parameter to add_action. I don’t actually know what priority Akismet has (default is 10), but you could start by trying this: add_action( ‘wp_default_scripts’, ‘pwcc_jquery_to_footer’, 9);
You don’t need javascript, just change the class using the get_theme_mod variable e.g. <?php $layout = get_theme_mod(’embee_layout_section_options[site_layout]’, ‘3’); $class=””; if($layout == ‘1’) { $class=”this”; } elseif($layout == ‘2’) { $class=”that”; } ?> <div class=”<?php echo $class; ?>”> // stuff </div> Put that in your template file e.g. page.php and the live customizer will pick it … Read more
You got javascript file and CSS file! Then you have to put those files in you child theme folder like themes -> your_child_theme_folder -> js(if you dont have js folder then create one) and place your js file here AND you have to put you css file in css folder inside your child theme. Now … Read more
Add your fallback code into a plugin and save your plugin in the MU folder: http://codex.wordpress.org/Must_Use_Plugins. Then this will run before any other plugins
Changing img: obj_test.stylesheet_directory_uri + ‘/img/ajax-loader.gif’, to img: “http:// urltoimage .com/test.gif”, solve the problem. Important – the url between ‘…’ does not work! The url must be between “…” That was the problem i dont figured out before 🙂
You can use this for a custom stylesheet. Copy and paste all the CSS from the original thickbox.css in your custom stylesheet. Now you can edit your custom CSS and add the code below in your plugin. function get_thickbox() { // Add the original thickbox add_thickbox(); // register your custom stylesheet // Make sure its … Read more