A blog post is something you do not typically go back and edit. It’s a one and done piece of content. However, sometimes there is a reason to go back and change content in a post, or more likely, to update the content on a page. Here is a code snippet that will show the
The following steps may be helpful for a site migration where you need to find and replace all the old URLs with the new URLs. Problem: site references old URL (http://www.domain1.com). New URL is http://www.domain2.com Solution: Use the command line to make short work of the task. user@server:~$ mysql -u root -p Enter password: Use the database
Adding this snippet to the functions.php of your WordPress theme will add a custom class to links output by the_tags template tag. function add_class_the_tags($html){ $postid = get_the_ID(); $html = str_replace(‘<a’,'<a class=”wpsnipp”‘,$html); return $html; } add_filter(‘the_tags’,’add_class_the_tags’,10,1);
I recently needed to use this for a theme I was building figured I would post the results up here for everyone. Adding this snippet to the functions.php of your WordPress theme will add a custom class to next and previous post_link. function add_class_next_post_link($html){ $html = str_replace(‘<a’,'<a class=”next”‘,$html); return $html; } add_filter(‘next_post_link’,’add_class_next_post_link’,10,1); function add_class_previous_post_link($html){ $html =