Tag Info

New answers tagged


Finally, I was able to iterate through all 34,788 entries, but only by running the job in smaller batches based on the post date. Here is the final code that I used on a page template. Thank you @ialocin for setting me on the right path. The job is done, but there has to be a better, more automatic, way to iterate through the posts without setting post date ...


The easiest way to do this would be via SQL. Firstly take a backup of your database in case anything goes wrong. Then using phpMyAdmin or a similar SQL frontend run this SQL command: UPDATE wp_posts SET post_content = REPLACE(post_content, '<br>', ''); This will replace the tag <br> with nothing in all post content. If the tags are in ...


The quickest solution is export posts table from database, replace tags this using any code-editor. For posts content are simple text not serialized, in this way you can do all replacement in less than 10 minutes without any hassle. Then import the sql file in db. Thanks


Firstly, I would consider using one of WordPress' wp_kses-like functions, instead of PHP's strip_tags(). Secondly, query your posts with WP_Query or get_posts() with the fields parameter set to ids - seems like you don't need more than that. Thirdly, split up your loop into steps that are effective and manageable. Because 34000+ posts will likely reach the ...

Top 50 recent answers are included