Identify Mobile / Tablet / Desktop Using Screen-size in CSS

Identify Mobile / Tablet / Desktop Using Screen-size in CSS

By OutsourcedContent — on October 20, 2017 Add these to your CSS stylesheet as necessary. CSS to be used only on Mobile devices This CSS will be used when the screen width is less than 576px. @media screen and (max-width: 576px) {   .selector {     property: value;   } } CSS to be used on anything BUT…

Translate WordPress Programmatically With Gettext (Without .PO/.MO)

Translate WordPress Programmatically With Gettext (Without .PO/.MO)

By OutsourcedContent — on October 23, 2017 Add this to the functions.php of your theme. This example is to be used with my Ask Me Anything (Anonymously) WordPress plugin. To use it with other themes and plugins, change the text domain of the theme or plugin in the highlighted areas. /** * Translate text strings…

Load Bootstrap 4 CSS And JS From MaxCDN – The Right Way

Load Bootstrap 4 CSS And JS From MaxCDN – The Right Way

By OutsourcedContent — on October 25, 2017 Add this to the functions.php of the active theme. /** * Load Bootstrap CSS and JS from MaxCDN – the right way * * @refer https://millionclues.com/wordpress-tips/load-css-and-js-the-right-way/ */ function mcabl1226_load_css_and_js() { // Load Boostrap CSS wp_enqueue_style( ‘bootstrap-css’, ‘https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css’ ); // Load Theme’s style.css wp_enqueue_style( ‘style’, get_stylesheet_uri() ); …

Prevent WordPress From Checking Update For Plugins

Prevent WordPress From Checking Update For Plugins

Many developers were concerned about the data WordPress should send back to WordPress.org when checking update for plugins and themes. Some have expressed concern that private plugins developed for a specific client or website may contain some sensitive information in their headers, like contact information for the developer, etc and it should not be send…