Select Menu
  • Home
  • Wordpress
  • Blogspot
  • SEO
  • Online Earning
  • About Us
  • Contact Us
  • Sitemap
  • PrivacyPolicy
  • About Us
  • Contact Us
  • Sitemap
  • Privacy Policy
Pressspot - Wordpress, Blogspot Coding And SEO Tutorial
  • Home
  • Wordpress
  • Blogspot
  • SEO
  • Earning
Home wordpress Do you know? how to add youtube video to wordpress post.

Tuesday, 28 August 2018

সিহাব সুমন

Do you know? how to add youtube video to wordpress post.

  সিহাব সুমন      Tuesday, 28 August 2018     wordpress      2 comments   
Now days youtube is a biggest video search and play engine. so gradually it is need to use youtube video in our wordpress post. for adding youtube video in your wordpress posts there are many plugins. also you can embed youtube video on your blogger blog or blogspot blog but today i am sharing some code which is very helpful for add youtube video to wordpress posts without any kinds of plugins. for this please follow some steps very carefully:
add youtube video to wordpress
add youtube video to wordpress
(Please backup your sites file and database before editing)
1. At first go to your wordpress sites dashboard.
2. Now select your theme which theme you want to edit.
3. Now open your themes 'functions.php' file.
4. Copy bellow code:
/*
    Shortcode to display youtube thumbnail on your wordpress blog.
    Usage:
    [youtube_thumb id="VIDEO_ID" img="0" align="left"]
    VIDEO_ID= Youtube video id
    img=0,1,2 or 3
    align= left,right,center
*/
function wp_youtube_video_thumbnail($atts) {
     extract(shortcode_atts(array(
          'id' => '',
          'img' => '0',
          'align'=>'left'
     ), $atts));
    $align_class='align'.$align;
    return '<img src="http://img.youtube.com/vi/'.$id.'/'.$img.'.jpg" alt="" class="'.$align_class.'" />';
}
add_shortcode('youtube_thumb', 'wp_youtube_video_thumbnail');
5. Now paste this code in 'functions.php' file and save and close it.
6. Now paste this code in your wordpress blog post.
[youtube_thumb id="rNWeBVBqo2c" img="0" align="center"]
(Change 'rNWeBVBqo2c' with your video id)
For following this article you can add youtube video to wordpress posts and if you want to know more about wordpress and blogger or blogspot then you can visit my another article in this blog.
Share This Post
Tweet Share Share Share Share Share

2 comments:

  1. pslvseo a520 February 2019 at 15:51

    Yoast SEO is a WordPress plug-in designed to help you improve some of the most important on-page SEO factors–even if you aren’t experienced with Web development and SEO. This plug-in takes care of everything from setting up your meta titles and descriptions to creating a sitemap. Yoast even helps you tackle the more complex tasks like editing your robots.txt and .htaccess.
    Some of the settings may seem a little complex if you’re new to SEO and WordPress, but Yoast created a complete tutorial to help you get everything set up. And the team at WPBeginner made this handy video to help you get set up quickly.

    ReplyDelete
    Replies
      Reply
  2. Erfan12 May 2019 at 10:52

    This is a great post and I read a way while back. It really helped me out.Thank you so much for this great article.
    SEO Tool
    wordpress tutorial

    ReplyDelete
    Replies
      Reply
Add comment
Load more...

Comments here

Popular Posts

  • How to add autoplay background music on blogger blog.
    We know that blogger or blogspot is a favorite blogging platform for all of bloggers. it is easy to use and free platform. one can easily ...
  • Do you know? how to stop all external request on your wordpress blog?
    At first take my salam, hope all of you are very fine. i am also. wordpress is a number one blogging platform. it is easy to use and manag...
  • If your wordpress theme doesn't support 'Menu' you can try this post for 'Menu' support.
    some low quality wordpress theme doesn't support menu. or when a wordpress theme maker create new custom theme then need menu support...
  • How to change default footer text from wordpress dashboard.
    When we enter our wordpress sites dashboard then we see some default text and link like this: which is wordpress related. however, if y...
  • Hide 'Screen Option' tab from your wordpress dashboard with some coding !!!
    Hope all of you are very fine. when we visit our wordpress dashboard then we see a tab menu on lef side corner which is named 'Screen O...
  • Wordpress file upload button or 'add media' button not working? this is the solution!!
    How are you? wish all of you are very fine. im also fine. you know that i always share without plugin post. today i am sharing a nice code ...
  • মোবাইলের মাধ্যমে গুগল ম্যাপে আপনার বাড়ী যুক্ত করুন সহজ পদ্ধতিতে !!
  • Stop dragging effect for wordpress metabox without any kinds of plugins!!
    At first take my salam. hope all of you are very fine. when we visit our wordpress sites dashboard, then we see some meta box and if you wa...
  • how to change the permalink in wordpress without plugins ?
    how to change the permalink in wordpress Generally we set wordpress permalink from setting option. but if you try you can set permal...
  • Remove wordpress logo from admin bar!
    When we visit our wordpress sites admin panel in dashboard. then we see a wordpress logo like this: Which is containing a wordpress logo...

Contact Form

Name

Email *

Message *

Subscribe to our email newsletter & receive updates right in your inbox.

Blog Archive

Popular Posts

  • How to add autoplay background music on blogger blog.
    We know that blogger or blogspot is a favorite blogging platform for all of bloggers. it is easy to use and free platform. one can easily ...
  • Do you know? how to stop all external request on your wordpress blog?
    At first take my salam, hope all of you are very fine. i am also. wordpress is a number one blogging platform. it is easy to use and manag...
  • If your wordpress theme doesn't support 'Menu' you can try this post for 'Menu' support.
    some low quality wordpress theme doesn't support menu. or when a wordpress theme maker create new custom theme then need menu support...
  • How to change default footer text from wordpress dashboard.
    When we enter our wordpress sites dashboard then we see some default text and link like this: which is wordpress related. however, if y...
  • Hide 'Screen Option' tab from your wordpress dashboard with some coding !!!
    Hope all of you are very fine. when we visit our wordpress dashboard then we see a tab menu on lef side corner which is named 'Screen O...
click here

Labels

blogspot (1) wordpress (27)

Facebook Fan

BANNER 728X90

মোট পৃষ্ঠাদর্শন

Sparkline

আমার সম্পর্কে

  • সিহাব সুমন
  • itbatayan

Responsive Ads

Responsive Ads Here
Powered by: Blogger
Sitemap | Terms Condition |
Copyright © Pressspot - Wordpress, Blogspot Coding And SEO Tutorial