- This topic has 17 replies, 3 voices, and was last updated 8 years, 10 months ago by Sakin.
-
AuthorPosts
-
August 13, 2015 at 10:48 am #63490HarryParticipant
Hi guys,
I am using Catch Responsive Pro.
I really would like to have embedded video to replace the Image Featured Slider.
Can we do that? How?
Thank you.
August 13, 2015 at 11:31 pm #63708SakinKeymaster@Harry: Sorry there in no option to add in Embedded video to replace the Featured Image Slider.
But if you want then you can do it in custom way. For that, you need to build child theme. For child theme, refer to http://catchthemes.com/blog/create-child-theme-wordpress/ and then just add the following code in your child theme functions.php file:
function catchresponsive_featured_slider() { ?> <section id="feature-slider"> <div class="wrapper"> Add in Video here </div><!-- .wrapper --> </section><!-- #feature-slider --> <?php }
August 14, 2015 at 2:41 am #63725HarryParticipantHi Sakin,
Thank you for your respond.
I’ve been using a child theme. When I added this code on in the functions.php, it doesn’t work.
Here is the complete code, please let me know if i did anything wrong:
<?php
//
// Recommended way to include parent theme styles.
// (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
//
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array(‘parent-style’)
);
}
//
// Your code goes below
//function catchresponsive_featured_slider() { ?>
<section id=”feature-slider”>
<div class=”wrapper”>
Add in Video here
</div><!– .wrapper –>
</section><!– #feature-slider –>
<?php
}August 14, 2015 at 3:25 pm #63796SakinKeymasterYou need to replace that
Add in Video here
with your video code.August 14, 2015 at 4:27 pm #63805HarryParticipantHi Sakin,
It works like magic.
Thank you so much.
August 14, 2015 at 4:40 pm #63806HarryParticipantThere is only one little problem;
It comes up on every page.How do i make it only on the home page?
Thanks Sakin.
August 14, 2015 at 7:21 pm #63811SakinKeymaster@Harry: For that you need to replace previous code with the following code:
function catchresponsive_featured_slider() { if ( is_home() ) : ?> <section id="feature-slider"> <div class="wrapper"> Add in Video here </div><!-- .wrapper --> </section><!-- #feature-slider --> <?php endif; }
August 14, 2015 at 10:19 pm #63826HarryParticipantHi Sakin,
I tried this, didn’t work.
I’m lost.
August 14, 2015 at 10:30 pm #63827SakinKeymaster@Harry: Post in your site URL and let me know what’s not working. Also post in your code. Are you using Static Page in homepage, then it will be as below:
function catchresponsive_featured_slider() { if ( is_front_page() ) : ?> <section id="feature-slider"> <div class="wrapper"> Add in Video here </div><!-- .wrapper --> </section><!-- #feature-slider --> <?php endif; }
August 15, 2015 at 3:50 am #63841HarryParticipantIt works perfectly now.
Thank you Sakin. I love your job and service!
August 15, 2015 at 7:04 am #63848HarryParticipantNow, hopefully I have the last question.:)
How do we make this embedded video responsive?
August 15, 2015 at 7:54 am #63851SakinKeymaster@Harry: Ok for that you need to replace the previous code with the following:
function catchresponsive_featured_slider() { if ( is_front_page() ) : ?> <section id="feature-slider"> <div class="wrapper hentry"> Add in Video here </div><!-- .wrapper --> </section><!-- #feature-slider --> <?php endif; }
Then add the following css in your child theme style.css
#feature-slider .hentry { margin: 0; }
August 15, 2015 at 11:53 am #63860HarryParticipantPerfect!
Thank you so much.
August 16, 2015 at 11:21 pm #64120SakinKeymaster@Harry: Thanks for your appreciation. If you are happy with my service and Catch Responsive Theme, then please support by providing your valuable review and rating at https://wordpress.org/support/view/theme-reviews/catch-responsive?rate=5#postform
November 23, 2015 at 3:08 pm #80131ncmh-cardiffMemberHi Sakin, can a similar method be used to replace the homepage slider in Catch Everest Pro?
November 25, 2015 at 10:50 pm #80269SakinKeymaster@ncmh-cardiff: Yes, it depends on what you want to do it. Please post in your site URL and all the details of what you want to do in Catch Everest Pro support forum at http://catchthemes.com/support-forum/forum/catch-everest-pro-premium/
February 27, 2016 at 3:57 am #86375HarryParticipantHi Sakin,
I think stuffed up my function.php on my website.
I used Catch Responsive Pro Child Theme.
This is my full code, would you please kindly check and see what I did wrong?
<?php
//
// Recommended way to include parent theme styles.
// (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
//
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array(‘parent-style’)
);
}
//
// Your code goes below
//function catchresponsive_featured_slider() {
if ( is_front_page() ) : ?>
<section id=”feature-slider”>
<div class=”wrapper hentry”>
“My video embedded code”
</div><!– .wrapper –>
</section><!– #feature-slider –>
<?php endif;
}February 28, 2016 at 2:19 am #86418SakinKeymaster@harry: Your code is not readable as you didn’t use code tag to post in your code here. So, I recommend you to post your in https://gist.github.com/ or http://pastebin.com/ and post in your link here. So, that I can check in.
-
AuthorPosts
- The topic ‘Replace Featured Slider with embeded video’ is closed to new replies.