Smooth Scroll Page When Clicking Anchor Link – jQuery

Add this to your jQuery file. // Smooth scroll When Clicking Anchor // @refer var jQueryroot = $(‘html, body’); $(‘a[href^="#"]’).click(function () {   jQueryroot.animate({     scrollTop: $( $.attr(this, ‘href’) ).offset().top   }, 1000);   return false; });

Posted in WordPress Tagged with: , ,

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

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: , , ,
Email Stamp

Free Newsletter

Get my newest blog posts and insider tips. No more than a few emails a year.

Just enter your email address below and click Sign Up Now

Please enter all required fields
Correct invalid entries

You have Successfully Subscribed!