Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #63490
    Harry
    Participant

    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.

    #63708
    Sakin
    Keymaster

    @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 
    }
    #63725
    Harry
    Participant

    Hi 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
    }

    #63796
    Sakin
    Keymaster

    You need to replace that Add in Video here with your video code.

    #63805
    Harry
    Participant

    Hi Sakin,

    It works like magic.

    Thank you so much.

    #63806
    Harry
    Participant

    There is only one little problem;
    It comes up on every page.

    How do i make it only on the home page?

    Thanks Sakin.

    #63811
    Sakin
    Keymaster

    @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;
    }
    #63826
    Harry
    Participant

    Hi Sakin,

    I tried this, didn’t work.

    I’m lost.

    #63827
    Sakin
    Keymaster

    @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;
    }
    #63841
    Harry
    Participant

    It works perfectly now.

    Thank you Sakin. I love your job and service!

    #63848
    Harry
    Participant

    Now, hopefully I have the last question.:)

    How do we make this embedded video responsive?

    #63851
    Sakin
    Keymaster

    @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; }

    #63860
    Harry
    Participant

    Perfect!

    Thank you so much.

    #64120
    Sakin
    Keymaster

    @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

    #80131
    ncmh-cardiff
    Member

    Hi Sakin, can a similar method be used to replace the homepage slider in Catch Everest Pro?

    #80269
    Sakin
    Keymaster

    @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/

    #86375
    Harry
    Participant

    Hi 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;
    }

    #86418
    Sakin
    Keymaster

    @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.

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Replace Featured Slider with embeded video’ is closed to new replies.