Category: Code Snippets
-

Disable RSS Feeds On Your WordPress Blog
[ad_1] WordPress is one of the best Content Management System (CMS) available and it is such a well thought out flexible system that it can be used for any type of website. And since you can create multiple different types of sites, there is always going to be some features which aren’t needed or wanted…
-

Smooth Scroll Page When Clicking Anchor Link – jQuery
[ad_1] By OutsourcedContent — on November 16, 2017 Add this to your jQuery file. // Smooth scroll When Clicking Anchor // @refer https://stackoverflow.com/a/7717572/8255629 var jQueryroot = $(‘html, body’); $(‘a[href^=”#”]’).click(function () { jQueryroot.animate({ scrollTop: $( $.attr(this, ‘href’) ).offset().top }, 1000); return false; }); [ad_2]
-

Add Bootstrap4 Form Styling To WooCommerce Checkout Fields
[ad_1] By OutsourcedContent — on November 19, 2017 Add the following code to functions.php or to a custom plugin to style WooCommerce checkout form fields with sweet Bootstrap 4 styling. /** * Add Bootstrap form styling to WooCommerce fields * * @since 1.0 * @refer http://bit.ly/2zWFMiq */ function iap_wc_bootstrap_form_field_args ($args, $key, $value) { $args[‘input_class’][] =…
-

Display Upcoming Posts in WordPress Without a Plugin
[ad_1] WordPress comes with a lot of cool features but ability to schedule your blog posts and publish them on specific time in future is one of my favorite. It is recommended that you don’t over load your readers by publishing all articles at once but schedule them to publish in uniform gap. This way…
-

https://millionclues.com/wordpress-tips/git-github-basics/
[ad_1] https://millionclues.com/wordpress-tips/git-github-basics/ [ad_2]
-

Launch Bootstrap 4 Modal From WordPress Menu
[ad_1] By OutsourcedContent — on November 30, 2017 Add .launch-contact-modal class to your WordPress menu item. This can be done from the admin interface Appearance > Menu. Change #contactModal in the following jQuery to the ID of your Bootstrap 4 modal. jQuery(document).ready(function($){ // Adding Bootstrap Modal to WordPress Menu $(‘.launch-contact-modal’).find(‘a’).attr(‘data-toggle’, ‘modal’); $(‘.launch-contact-modal’).find(‘a’).attr(‘data-target’, ‘#contactModal’); }); [ad_2]
-

Get A List Of All Custom Page Templates in WordPress
[ad_1] Pages are one of WordPress’s built-in Post Types. You’ll probably want most of your website Pages to look about the same. But sometimes, though, you may need a specific Page, or a group of Pages, to display or behave differently. This is easily accomplished with custom Page Templates. WordPress allows you to create custom…
-

https://millionclues.com/wordpress-tips/adding-safari-only-css/
[ad_1] https://millionclues.com/wordpress-tips/adding-safari-only-css/ [ad_2]
-

Modify WordPress Main Query – The Right Way
[ad_1] By OutsourcedContent — on December 9, 2017 /** * Modify WordPress Main Query – The Right Way * * @refer https://millionclues.com/wordpress-tips/modify-wordpress-main-query/ */ function modify_wp_main_query_done_right( $query ) { if ( $query->is_main_query() ) { $query->query_vars[‘meta_key’] = ‘statusverified_13141’; $query->query_vars[‘meta_value’] = 1; } } add_action( ‘pre_get_posts’, ‘modify_wp_main_query_done_right’ ); Refer WP Query to discover other query_vars [ad_2]
-

Force Sub Categories To Use Parent Category Templates
[ad_1] When a viewer clicks on a link to one of the Categories on your WordPress site, he or she is taken to a page listing the Posts in that particular Category in chronological order. WordPress uses `category.php` template as a default layout to display all category listing pages. But you also have option to…