How To Display Video Block Only on articles/posts

Posted in: Newspaper
Post count: 102

So many features, I forget sometimes, from where can I set that, I want to display Youtube Video block only on posts/articles,

Means after the article end, suppose on every article it should display after comment box.

Thanks 🙂

Post count: 22421

Hello,

On posts you cannot use visual composer as you would on pages. you will have to create a video lement in visual composer on a dummy page and then use a do_shortcode function in the theme files to show the element after the comment box. There is no setting in the theme that can allow you to add content there.
This will add a video across all posts that use the template that you alter.
Here is an example:
1 Create the video element on a dummy page and set the video id to it: http://screencast.com/t/l4X0HTyCJ
2 Copy the shortcode from the video in classic editing mode and text mode: http://screencast.com/t/JX7DVWA75q
3. Use this function and place the shortcode inside it:

<?php echo do_shortcode('here you should add your shortcode'); ?>

4. Place it in one or more of the theme template files. There is a file for each post style:
http://screencast.com/t/MvIqS1GMS3Jb

Thank you!

Post count: 102

I want to add that video block just only on article, means on every article users can see youtube videos, the video widget should appear on footer!

Post count: 22421

The method I provided only adds the video on articles. It will not be seen on any other page so I;m not sure how you want it now.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.