WordPress changing single quotes to double quotes in title and content

Add this code your functions.php Reference : Issue with double dash remove_filter( ‘the_title’ , ‘wptexturize’ ); remove_filter( ‘the_content’ , ‘wptexturize’ ); remove_filter( ‘the_excerpt’ , ‘wptexturize’ ); remove_filter( ‘comment_text’ , ‘wptexturize’ ); remove_filter( ‘list_cats’ , ‘wptexturize’ );

Display posts containing at least 1 from a list of say 10 tags but not containing other tags

Paste this code at the end of your child themes functions.php file. It will exclude all posts with the comma separated list of tag i.d’s from displaying on the home page loop. add_filter(‘request’, ‘filter_tag_loop’); function filter_tag_loop($params) { $params[‘tag__not_in’] = array(49); return $params; } Or you could use WP_Query $query = new WP_Query( array( ‘tag__not_in’ => … Read more

optimise SQL wordpress call

The query itself may need to be optimized (SQL is not my speciality, though). However, don’t forget you can store the results of an expensive operation in cached memory. WordPress offers a Transients API to make things easy. Here’s a quick example: // Try to load the value from cache $transient_key = ‘my_query’; $value = … Read more

Recent Posts titles not working with Qtranslate

Qtranslate works probably with a filter on the_title. So you have to use functions that make use of that filter, not the raw post title. Example, not tested: foreach( $recent_posts as $recent ) { printf( ‘<li class=”lastposts”><a href=”https://wordpress.stackexchange.com/questions/129891/%1$s” title=”%2$s” >%3$s</a></li>’, get_permalink( $recent[“ID”] ), the_title_attribute( array ( ‘post’ => $recent[“ID”], ‘echo’ => FALSE ) ), get_the_title( … Read more

Custom post type with custom fields enabled, is there a way to set a default group of fileds?

Meta Boxes are what you need. function add_custom_meta_box() { add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args ); } add_action( ‘add_meta_boxes’, ‘add_custom_meta_box’ ); Set the custom post type in the 4th parameter. This should get you started: Custom Meta Box in WordPress Post Pages and Custom Post Type

Widget front-end fails to echo as expected from checkbox

on line 49 it seems you have hardcoded in the checkbox value it should actually look like this, it was always going to be true even if it did work as intended: <input id=”<?php echo $this->get_field_id(‘checkbox’); ?>” name=”<?php echo $this->get_field_name(‘checkbox’); ?>” type=”checkbox” value=”<?php echo $checkbox; ?>” <?php checked( ‘1’, $checkbox ); ?> /> also after … Read more