add_filter(‘style_loader_tag’, ‘flatsomeIconsPreloader’, 10, 2); function flatsomeIconsPreloader($html, $handle) { if( 0 != strpos( $html, ‘flatsome-icons’ ) ) { $html = str_replace( “rel=’stylesheet'”, “rel=’preload’ as=’style’ “, $html ); $html .= “”; } return $html; }
function my_shortcode() { $message = ‘Hello world!’; // Output needs to be return return $message; } // register shortcode add_shortcode(‘shortcodeNameToCall’, ‘my_shortcode’);
DELETE from wp_users where wp_users.ID not in ( SELECT meta_value FROM wp_postmeta WHERE meta_key = ‘_customer_user’ ) AND wp_users.ID not in ( select distinct(post_author) from wp_posts )
global $post; $terms = get_the_terms( $post->ID, ‘product_cat’ ); foreach ($terms as $term) { $product_cat_id = $term->term_id; break; }
Outlook.com SMTP Settings Host: smtp-mail.outlook.com Port: 587 Username: Your Outlook.com account email (e.g. john@outlook.com) Password: Your Outlook.com account password Encryption: TLS Office 365 SMTP Settings Host: smtp.office365.com Port: 587 Username: Your Office 365 account email Password: Your Office 365 account password Encryption: TLS Hotmail SMTP Settings Host: smtp.live.com Port: 587 Username: Your Hotmail account email (e.g. john@hotmail.com) Password: Your Hotmail account password Encryption: TLS Yahoo Mail SMTP Settings Host: smtp.mail.yahoo.com Port: 465 […]
jQuery(document).ready(function( $ ) { // $ Works! You can test it with next line if you like // console.log($); });
.grow { transition: all .2s ease-in-out; } .grow:hover { transform: scale(1.1); }
$content = get_post()->post_content; echo $content = apply_filters(‘the_content’, $content);
add_action(‘admin_head’, ‘hide_updates’); function hide_updates() { if(get_current_user_id()!=1){ echo ‘<style> span.update-plugins{display:none!important;} tr.plugin-update-tr.active {display:none!important} .wrap .notice.notice-error { display: none!important;} </style>’; } }
function wpdocs_register_meta_boxes() { add_meta_box( ‘meta-box-id’, __( ‘Backend Name’, ‘textdomain’ ), ‘wpdocs_my_display_callback’, ‘post_type’ ); } add_action( ‘add_meta_boxes’, ‘wpdocs_register_meta_boxes’ ); function wpdocs_my_display_callback( $post ) { // INPUT FIELDS GO HERE ?> <label>Year: <input type=”text” name=”inputName” value=”<?php echo get_post_meta(get_the_ID(), ‘meta_key’)[0]; ?>” /></label> <?php } /** * Save meta box content. * * @param int $post_id Post ID */ […]