Youtube descriptive Text

(scroll down to see the whole text)

Nolan shares how to setup your YouTube video description to earn more views and money. 🔥 Get Think Media's Description Template Here ➡️ http://YTtemplate.com ⭐️Check out our FREE CLASS on 3 Secrets for Growing Your YouTube Channel in 2026 here!: http://ThinkMasterclass.com This video is NOT sponsored. Some product links are affiliate links which means if you buy something we'll receive a small commission. ============================= All Products and Gear Mentioned in this video ============================= Our Gear list ➡️ http://ThinkGearGuide.com Show up in Search ➡️ https://www.youtube.com/watch?v=yDyY-BOkE7Y =========================== Connect with us! ============================= Tik Tok: ➡︎ https://www.tiktok.com/@thinkmediaofficial/ IG: ➡︎ https://www.instagram.com/officialthinkmedia/ =========================== Subscribe and Listen to the Think Media Podcast HERE:📱 =========================== ➡︎YT: @ThinkMediaPodcast ➡︎Apple: https://apple.co/2F3tmIS ➡︎Spotify: https://spoti.fi/36qevE8 ⏰ Timecodes ⏰ 0:00 YouTube Descriptions the Right Way 0:18 Keywords, SEO, CTA's 2:10 Video & Affiliate Links 3:49 Build Your Community - Products & Socials Info 4:24 Engagement & Resources 5:02 Disclaimers 5:26 Timecodes & Hashtags 6:29 How to Insert Description Template =========================== Here are the ways to work with us here at Think Media: =========================== ⚡️FREE CLASS: Watch our FREE YouTube class here: ➡︎ http://ThinkMasterclass.com ⚡️BOOK: Check out the #1 best-selling book YouTube Secrets here: ➡︎ https://ytsecrets.com/ ⚡️For Support inquires, or Business inquiries, please go to ➡︎ http://ThinkMediaSupport.com ⚡️Join our YouTube Course & Community TODAY with this special limited-time bundle at: http://joinvra.com =========================== What We Use For Music: =========================== 🔥 Get a 7-day free trial for a new personal or commercial plan here! ➡️ http://thinkmediasounds.com =========================== In-Depth Channel Analytics and Ideas =========================== Get a 30-Day trial of vidIQ's Boost plan for just $1 here: 👉 http://vidiq.com/think =========================== #thinkmedia #nolanmolt #youtubetips Our mission here at Think Media is to help purpose-driven entrepreneurs go full-time doing what they love and making an impact through the power of video. Disclaimer: Please see the link for our disclaimer policy for all of our videos on the Think Media and Think Media Podcast YouTube channels. https://go.thinkmedia.com/youtube-disclaimer

below the video element place a text-block with:

[video_description id="6rWjoqkKG7o"]

YouTube descriptive text
(invisible – for SEO purposes only)

Hi, and welcome to this video on descriptive texts! When writing, authors will use descriptive text to bring their writing to life by forming a vivid image in the reader’s mind. There are a few ways to go about this. Check out our online test prep courses! https://www.mometrix.com/university For more resources on this topic, go to: https://www.mometrix.com/academy/descriptive-texts/ Watch our English review playlist! https://www.youtube.com/watch?v=IawIjqOJBU8&list=PLV7pH0sATf6i401CT1sMF7DABzHRCxGrZ Mometrix Study Guides: https://www.mometrix.com Mometrix Flashcards: https://www.flashcardsecrets.com/ More Test Prep Resources: https://www.mometrix.com/academy Follow Mometrix Academy on Pinterest: https://www.pinterest.com/mometrixacademy/
below the video element place a text-block with:

[video_description id="D5UFbOC9ndw"]

this is just placed for SEO purpose 
and text-block got that custom class: 
visually-hidden
#top .visually-hidden .yt-desc-box {
  border: 0 !important;
  clip: rect(0 0 0 0);
  height: 1px !important;
  margin: -1px;
  overflow: hidden;
  padding: 0 !important;
  position: absolute;
  width: 1px;
}

Registering the shortcode

(for child-theme functions.php)

/**
 * Final Version: Fetches YouTube description and converts links correctly
 * preventing double-tagging or broken HTML.
 */
function get_yt_description_final_v3($atts) {
    $a = shortcode_atts(array('id' => ''), $atts);
    if (empty($a['id'])) return 'Video ID missing.';

    $v_id = esc_attr($a['id']);
    
    // Use a fresh cache key to overwrite the broken HTML in your database
    $transient_key = 'yt_desc_v3_clean_' . $v_id;
    $description = get_transient($transient_key);

    if (false === $description) {
        $response = wp_remote_get("https://www.youtube.com/watch?v=" . $v_id, array(
            'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36'
        ));

        if (is_wp_error($response)) return 'YouTube connection error.';

        $html = wp_remote_retrieve_body($response);

        if (preg_match('/"shortDescription":"(.+?)"/', $html, $matches)) {
            $description = $matches[1];
            
            // Decode unicode characters
            $description = json_decode('"' . $description . '"');
            
            // Clean up backslashes before storing
            $description = stripslashes($description);
            
            set_transient($transient_key, $description, DAY_IN_SECONDS);
        } else {
            return 'Description currently unavailable.';
        }
    }

    // 1. First: Escape the raw text to be safe from XSS
    $safe_desc = esc_html($description);

    // 2. Second: Convert URLs into clickable links using a more precise regex
    // This regex matches URLs starting with http or https
    $pattern = '~(?<!["\'>])\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))~';
    $clickable_desc = preg_replace($pattern, '<a href="$0" target="_blank" rel="nofollow">$0</a>', $safe_desc);

    // 3. Output the result
    return '<div class="yt-desc-box" style="white-space: pre-wrap; word-break: break-word; background:#f0f0f0; padding:20px; border-radius:5px; border:1px solid #ddd; height:350px; overflow-y:auto;">' 
           . $clickable_desc . 
           '</div>';
}
add_shortcode('video_description', 'get_yt_description_final_v3');

The CSS for the box

mainly it is ruled by the snippet itself – if you like to overwrite that …

/* === maybe you restrict the height - and let scroll you to more content === */
/* === change the values inside the snippet to your needs === */

.yt-desc-box {
  height: 350px !important;
  overflow-y: auto; 
  border-left: 4px solid #ff0000;
  scrollbar-width: thin; /* only for Firefox */
  scrollbar-color: #ccc #f9f9f9; /* only for Firefox */
}

/* Scrollbar-Design for Chrome, Edge & Safari */
.yt-desc-box::-webkit-scrollbar {
  width: 8px;
}
.yt-desc-box::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.yt-desc-box::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
.yt-desc-box::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}