Remove meta description on certain pages

You should be able to remove the existing description tag with the following code: remove_action( ‘wp_head’, ‘_wp_render_title_tag’, 1 ); Put the above snippet inside the same function you are using to conditionally add a new tag so there is always only a single description tag at a time.

Conditional Header in wordpress

It seems that you have forgotten to use <?php and ?> properly. Remember to open and close the php tag like the following: <?php if ( is_singular( array( ‘rivista’, ‘rivista-trimestrale’ ) ) ) {?> <script> jQuery(function($){ $(‘.parallax-window’).parallax({imageSrc: ‘<?php echo $ilgelo_options[‘ilgelo-parallax-image’][‘url’];?>’}); }); </script><?php } else { ?> <script> jQuery(function($){ $(‘.parallax-window’).parallax({imageSrc: ‘STYLESHEETPATH.”/img/header-rivista.jpg”‘}); }); </script><?php } ?>

Add a class to the anchor tag on HTML5 gallery

f you mean to add a class on the anchor image wrapper that you have added using wp-editor then you could add folllowing code : this will filter the content and add class to your image <?php function add_class_to_gallery($content) { $classes=”gallery-link”; // check if there are already a class property assigned to the anchor if … Read more

add_rewrite_rule works in themes function php but when moved into plugin it stops working

When a plugin is activated, the activation hook is the only code that runs on that request. If you flush rewrite rules on activation, your rule isn’t in the array of rules that everything gets rebuilt from, unless you explicitly add it first in the activation hook. register_activation_hook( __FILE__, ‘myplugin_flush_rewrites’ ); function myplugin_flush_rewrites() { // … Read more