Cool Video Gallery
[resolved] How do I instal Cool Video Gallery into template? (11 posts)

  1. john kimon
    Posted 3 years ago #

    Very new to wordpress and I'm trying to figure out how to instal Cool Video Gallery at the top of my front-page, so it stays as a static element. I understand that to do this I have to put the shortcode – [cvg-gallery galleryId='3' mode='showcase' limit='5' /] – into the theme. How do I do this? Do I put it into the main theme or the child theme I've created, and where exactly do I put it? The instructions given are as follows:

    In order to use slideshow and showcase in custom templates created use the function cvgShowCaseWidget(gid, limit) and cvgSlideShowWidget(gid, limit) (where gid is gallery id and limit is the limit for videos).

    Do I create a php file, add the shortcode and put it in my child theme ? How do I determine where exactly on my front page the Gallery will appear?

    Would appreciate any guidance or step-by-step instructions easy for wordpress novice to grasp. Thanks in advance.


  2. john kimon
    Posted 3 years ago #

    Can someone please respond to this. I don't think I'm asking how to perform brain surgery. To be honest, I've posted a few basic questions on this support forum and not got much help. Am I on the wrong forum? Is there another forum or a better forum I should be on?

  3. teamsoft
    Posted 3 years ago #

    Hi John,

    Have you tried inserting in in the main index.php file. This is usually the template for your homepage. You might want to play around with the positioning and then dial it in with some css.

    thanks for the shortcode!

  4. john kimon
    Posted 3 years ago #

    Didn't do the trick, unfortunately. Pasted in short code to index php and nothing happened. All I'm trying to do – using the Calotropis theme – is get rid of the static image at top of home page, which illustrates the featured post, and replace it with a more dynamic slider gallery – video or image. It can't be that complicated, but it seems it is.

    Thanks for responding to my question.

  5. teamsoft
    Posted 3 years ago #

    Can you post a link to your site and the code from the index template file

    also have you looked at this http://shailan.com/2179/how-to-use-shortcodes-in-your-theme-files/

    Seems shortcodes are reserved for posts and pages.

  6. john kimon
    Posted 3 years ago #

    I've got the site on a local host at the moment as I tinker with it, so can't give you a link; but, as I said above, it's the Calotropis theme I'm working on and what I'm trying to do is remove the static image/feature post on home page and replace it with a slider gallery.

    Here's the shortcode I posted into an index.php file, which I copied into my Calotropis child theme:

    [cvg-gallery galleryId='3' mode='showcase' limit='5' /]

    This was the only code in the file. It didn't do anything.

    I'll go through that link on shortcodes now, see if it helps.


  7. john kimon
    Posted 3 years ago #

    Tried all the mucking about from Shailan and couldn't get anything going. Actually, what I've realised is that there's no point in me proceeding unless I can get rid of the static image/feature post in the Calotropis theme, since even if I can get a slider up and running, it won't be any use unless I can make space for it at the top of the page. I'll ask about this in Themes support.

  8. raychilm
    Posted 3 years ago #

    To insert shortcode into a template file you must use:

    <?php echo do_shortcode( '[cvg-gallery galleryId='3' mode='showcase' limit='5' /]' ); ?>

    The shortcode on it's own is only usable within the content of a post/page, other wise it must be formated in php talk...

  9. fzishk
    Posted 3 years ago #

    i have tried this code in template
    <?php echo do_shortcode( '[cvg-gallery galleryId='1' mode='showcase' limit='5' /]' ); ?>

    but its not working... i found this error :
    Parse error: syntax error, unexpected T_LNUMBER in C:\Websites\ceetv.tv\ceetv.tv\wwwroot\wp-content\themes\videozoom30\index.php on line 18

  10. schleini
    Posted 3 years ago #

    Hi everyone,

    dont know if you still need some answers (because the status is resolved). Here is the solution for the php code to your example:
    1. (@john):
    <?php cvgShowCaseWidget(1,5); ?> or
    <?php cvgSlideShowWidget(1); ?>
    2. (@fzishk):
    I think the echo do_shortcode does not work - take a look on 1)
    for the solution! Take also care about the php syntax and the
    quotation marks!
    the echo syntax for " " and ' ' is shown here:
    example: echo "<h5 class='specialH5'>I love using PHP!</h5>";


  11. ranjith8108
    Posted 3 years ago #

    Hi guys,

    Can anybody please mention me how to do slideshow for this cool video so that 5 images will come at a time and after some seconds delay another posted videos appears in same div.please reply..

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Cool Video Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic