- This topic has 3 replies, 2 voices, and was last updated 7 years, 10 months ago by Mahesh.
-
AuthorPosts
-
July 13, 2016 at 3:14 pm #95296PeterParticipant
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
July 13, 2016 at 4:38 pm #95305MaheshKeymaster@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,
MaheshJuly 13, 2016 at 5:44 pm #95338PeterParticipantAs 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?
July 14, 2016 at 9:18 am #95429MaheshKeymaster@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 -
AuthorPosts
- The topic ‘How to add a News Ticker in header area’ is closed to new replies.