Current User Display Name

// [current_user_display_name] function display_current_user_display_name () { $user = wp_get_current_user(); $display_name = $user->display_name; return $user->display_name; } add_shortcode(‘current_user_display_name’, ‘display_current_user_display_name’);Continue reading

change from the address

// Please edit the address and name below before activating this snippet. // Change the From address. add_filter( ‘[email protected]’; function ( $original_email_address ) { return; } ); // Change the From name. add_filter( ‘allowmetoshare’; function ( $original_email_from ) { return;…Continue reading

change from the address

// Please edit the address and name below before activating this snippet. // Change the From address. add_filter( ‘[email protected]’; function ( $original_email_address ) { return; } ); // Change the From name. add_filter( ‘allowmetoshare’; function ( $original_email_from ) { return;…Continue reading

Add the page slug body class

function wpcode_snippet_add_slug_body_class( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type . ‘-‘ . $post->post_name; } return $classes; } add_filter( ‘body_class’, ‘wpcode_snippet_add_slug_body_class’ );Continue reading

Link Featured Image to Post

/** * Wrap the thumbnail in a link to the post. * Only use this if your theme doesn’t already wrap thumbnails in a link. * * @param string $html The thumbnail HTML to wrap in an anchor. * @param…Continue reading

Head Segment ID Identification

session_start(); ob_start(); if(isset($_SESSION[‘SEGMENTID’])): $SegementID = $_SESSION[‘SEGMENTID’]; else: $n = rand(10e16, 10e20); $_SESSION[‘SEGMENTID’] = base_convert($n, 10, 36);endif; if ( is_user_logged_in() ) { $_SESSION[‘USERSTATUS’] = “LOGGED_IN”; } else { $_SESSION[‘USERSTATUS’] = “LOGGED_OUT”; }Continue reading

Tyler Hall Tech Custom Snippets (copy)

// Custom PHP Code by Tyler (TITLE) function page_title_sc( ){ return get_the_title(); } add_shortcode( ‘page_title’, ‘page_title_sc’ ); // Enable Shortcode Execution in Text Widgets add_filter( ‘widget_text’, ‘do_shortcode’ ); // Disable Gutenberg Editor (use Classic Editor) add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’,…Continue reading