Category Archives: Wordpress

Popular provider SMTP settings

Outlook.com SMTP Settings Host: smtp-mail.outlook.com Port: 587 Username: Your Outlook.com account email (e.g. [email protected]) 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. [email protected]) Password: Your Hotmail account password Encryption: TLS Yahoo Mail SMTP Settings Host: smtp.mail.yahoo.com Port: 465 […]

Add meta box – editor for post custom meta

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 */ […]

Custom columns content

add_action( ‘manage_colourmedia_column’, ‘colourmedia_columns’, 10, 2 ); function manage_colourmedia_columns( $column, $post_id ) { global $post; $terms = get_post_meta( $post_id ); switch( $column ) { case ‘thumbnail’ : $url = get_the_post_thumbnail_url($post_id); printf( ‘<img src=”‘.$url.'” style=”width:100px”/>’ ); break; case ‘city’ : printf($terms[‘City’][0]); break; case ‘category’ : $cat_list = wp_get_post_terms($post->ID, ‘category’, array(“fields” => “names”)); foreach($cat_list as &$category){ echo ‘<a […]