Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #95296
    Peter
    Participant

    I was wondering if anyone knows how to add a news ticker so that it sits at the bottom of the featured slider and before anything else please or as an alternative just below the social media icons.

    the script I have is:

    <?php if(function_exists(‘ditty_news_ticker’)){ditty_news_ticker(218);} ?>

    I hope you can help on this one

    #95305
    Mahesh
    Keymaster

    @petermilliken: You have to create child theme for this. You can find more on how to create child theme HERE. Then in your child theme’s functions.php add the following codes.

    add_action( 'init', 'catchresponsive_child_ticker_below_slider' );
    function catchresponsive_child_ticker_below_slider() {
    	//Display Ticker below Slider
    	add_action( 'catchresponsive_before_content', 'catchresponsive_display_ticker', 11 );
    	
    	//Display Ticker Below Social Icons
    	//add_action( 'catchresponsive_after_header', 'catchresponsive_display_ticker', 19 );
    }
    
    function catchresponsive_display_ticker() {
    	if( function_exists( 'ditty_news_ticker' ) ) {
    		ditty_news_ticker(218);
    	}
    }

    Note: In the above code
    add_action( 'catchresponsive_before_content', 'catchresponsive_display_ticker', 11 );
    will display ticker before Slider
    And
    add_action( 'catchresponsive_after_header', 'catchresponsive_display_ticker', 19 );
    will display ticker before Social Icons. Please use any one, and comment the other. For now I’ve displayed the ticker below slider.

    Regards,
    Mahesh

    #95338
    Peter
    Participant

    As I have already done a lot to the theme is it not possible to just add code to the current theme and when an update happens just reinstall the extra code?

    #95429
    Mahesh
    Keymaster

    @petermilliken: Yes, you can simply do it in the current theme but on updating the theme you’ll lose all the customization. That is where the child theme comes in handy. It is recommended to use child theme for customization.

    Regards,
    Mahesh

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to add a News Ticker in header area’ is closed to new replies.