Tag Info

New answers tagged

0

Exchange $ for jQuery. WordPress has default jQuery. Like the following Example: jQuery("#path2936, #path2932, #path2934, #path2902, #path2898, #path2906, #path2896, #path2914, #path2922, #path2920, #path2930").click(function() { jQuery('html, body').animate({ scrollTop: jQuery("#diventapromotore").offset().top }, 2000); }); If it's still ...


1

I have solved this problem after many researches, just comment two lines in meta_box.php file at end. $sanitizer = isset( $field['sanitizer'] ) ? $field['sanitizer'] : 'sanitize_text_field'; to //$sanitizer = isset( $field['sanitizer'] ) ? $field['sanitizer'] : 'sanitize_text_field'; at line 692 and $new = meta_box_sanitize( $new, $sanitizer ); to ...


1

Your button was added dynamically. So you can not bind event in simple way. As button is added after DOM is fully ready. You need to bind it with the refrence of document or body jQuery(document).on('click', '#readmore', function(e){ e.preventDefault(); alert("you clicked the button"); jQuery("#bodytext").css("display", "block"); }); Read ...


0

While in the process of implementing a CSP and defining the allowed sources, I was shocked to find the total number of resources ShareThis calls. At the time of writing this, I counted a total of 39 domains and subdomains it uses. Not a big surprise anymore why ShareThis was causing my slow page load times. From what I found, the majority of the calls are ...


0

This is frustrating issue as I can't depend on the content editors to be savvy enough with Wordpress / HTML to understand how the text they input will be parsed... --EDIT-- Having thought of this a bit more I have reconsidered my earlier answer. HTML5+ comes with the Tidy extension, if you are able to use this on your server then the following will work: ...


0

I just started posting here so I cannot comment below your comments on JD Cutter's feed, but I wanted to add something that might help. The header.php and footer.php are usually something that will appear on every page so you can rule those out if your edits are not on the header or footer. The page.php and single.php are usually the default template to ...


0

JD Cutter shared a solution that would help remove the HTML (or PHP) code completely, but if you do not know much about PHP and HTML, maybe using CSS would help. If the code you wish to remove has a CSS class/id, or is a direct child of one, you can use .yourclass {display:none;} to hide it. However, if you do want to edit the PHP files directly, there's a ...


0

Generally you'll have to edit the template file. You can do so by going to your wp-content > themes > and the theme you're working with. Since Wordpress is developed using PHP, you'll have an overall template file (page.php or single.php) which is made up of parts from other pages (header.php & footer.php). Editing those will allow you access to your ...


0

hackish solution: since wordpress add a lot of classes by default to the <img>, if you don't change that behaviour by force, you can always 'inject' something via str_replace before the string class=. In code: $image = get_the_post_thumbnail( $post->ID, 'medium', array( 'class' => 'myclass' ) ); $moreattrs = 'data-fullimg= "full.jpg"'; $image ...


0

WordPress doesn't operate with DOM for the purpose of page source generation from templates. Templates are treated and run as PHP source files, producing any and all output. Unless you have control over actual templates your options likely are: Attempting to buffer and rewrite output (rather fragile, more so for publicly released plugin) Adjust markup ...



Top 50 recent answers are included