How to find and replace (or add) specific word in a specific category?

Just found the solution after a long time of trying- UPDATE wp_posts p JOIN wp_term_relationships r ON r.object_id = p.id JOIN wp_terms t ON r.term_taxonomy_id = t.term_id JOIN wp_term_taxonomy x ON r.term_taxonomy_id = x.term_taxonomy_id SET p.post_content = CASE WHEN t.name=”ACategory” THEN REPLACE(post_content, ‘http://sitename.com/FileID/filename.zip’, ‘http://sitename.com/FileID/ACategory-filename.zip’) WHEN t.name=”BCategory” THEN REPLACE(post_content, ‘http://sitename.com/FileID/filename.zip’, ‘http://sitename.com/FileID/BCategory-filename.zip’) ELSE post_content END WHERE x.taxonomy …

Read more

How to create a new blog in wordpress?

WordPress can be used as a single install or as once blog where you create posts for that blog. Or you can set it up as a multisite installation where you can have a network of blogs. In a network of blogs, each site (blog) can have it’s own theme or plugins. Follow these instructions …

Read more

Expressions and str_replace

I looked at this from a far difficult angle, while the answer was so simple. For anyone in a similar situation: $(‘<span class=”form-field-checkbox”></span>’).insertAfter(‘input:checkbox,input:radio’);

Displaying Child Page’s Information

Something like this would work: <!–Child Page Thumbnails Start–> <?php $subs = new WP_Query( array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘page’, ‘meta_key’ => ‘_thumbnail_id’ ) ); if( $subs->have_posts() ) : while( $subs->have_posts() ) : $subs->the_post(); echo ‘<a href=”‘.get_permalink().'” title=”‘.get_the_title().'”>’.get_the_post_thumbnail().'</a>’.'<br/><h2><a href=”‘.get_permalink().'”>’.get_the_title().'</a></h2>’; the_content(); endwhile; endif; wp_reset_postdata(); ?> <!–Child Page Thumbnails End–>