Sanitize And Escape Text Input In WordPress

For general sanitization of text input fields and text areas for plugin options and such, use: sanitize_text_field( string $string ) For escaping in general for text input fields, use: esc_attr( string $string ) @refer https://wordpress.stackexchange.com/a/66323/90061

Posted in WordPress Tagged with: ,

Get Raw Unfiltered Post Title In WordPress

To retrieve the post title of a post as saved in the wp_posts table in the WordPress database use this <?php echo get_post_field( ‘post_title’, $post_id, ‘raw’ ); ?> If you use get_the_title() function, WordPress applies the ‘the_title‘ filter before returning

Posted in WordPress Tagged with: ,

Find All Posts Containing Given Image In WordPress

Pass the id of the image to the function and it will return an array with the id’s of all the posts that use the given image. /** * Find all posts that uses the given image * * @param  $image_id  Integer    ID

Posted in WordPress Tagged with: , ,

WordPress Theme For Matrimony Microsite

I recently developed a WordPress theme for a matrimony microsite. Client’s objective is to focus on mobile users and use the website to build a community around their brand. Development Overview The theme was designed by Jishnu of Artistory Media

Posted in WordPress Lab Tagged with: , , ,

Building 100% Custom WordPress Register And Login Pages

A detailed tutorial on how to build totally custom WordPress register and login pages. All the code you need and some styling inspiration. Impress your clients.

Posted in Tutorials, WordPress Tagged with: , , , ,