MemberPress: Add Author Bio Shortcode
function mpcs_author_bio_shortcode() { return nl2br( get_the_author_meta( ‘description’ ) ); }; add_shortcode( ‘mpcs-author-bio’, ‘mpcs_author_bio_shortcode’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function mpcs_author_bio_shortcode() { return nl2br( get_the_author_meta( ‘description’ ) ); }; add_shortcode( ‘mpcs-author-bio’, ‘mpcs_author_bio_shortcode’ );Continue reading
// Copy the Shortcode in the Insertion box below and paste it wherever you want the copyright symbol + year to be displayed. // This will output © 2023 or the current year automatically. echo “© ” . date( ‘Y’…Continue reading
// Copy the Shortcode in the Insertion box below and paste it wherever you want the copyright symbol + year to be displayed. // This will output © 2023 or the current year automatically. echo “© ” . date( ‘Y’…Continue reading
function g9_upcoming_events($atts) { $shortcode_args = shortcode_atts(array( ‘number’ => 3, // Number of events ‘category’ => ”, // Category slug ‘slider’ => false, ), $atts); // Ensure the global $post variable is in scope global $post; // Retrieve the next 3…Continue reading
function g9_get_post_terms() { global $post; ob_start(); $taxonomy_name = ‘category’; // Taxonomy name $terms = get_the_terms($post->ID, $taxonomy_name); if ($terms) : $term_links = array(); foreach ($terms as $term) { $term_links[] = ‘Continue reading
add_shortcode(‘thumbnail’, ‘thumbnail_in_content’); function thumbnail_in_content($atts) { global $post; return get_the_post_thumbnail($post->ID); }Continue reading
add_filter( ‘widget_text’, ‘do_shortcode’ );Continue reading