Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Override a function in custom.php

Home / Forums / Virtue Theme / Override a function in custom.php

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
June 15, 2014 at 9:40 am

Dear Ben,

First of all, thank you for an excellent theme! I’ve been playing around with it for a few days now and I’m really glad that I went for it.

I would like to make the Home Page Slider available on all pages. In the Virtue theme the slider is added by adding the action in lib/custom.php. I would like to override the function revolutionslider_top() in my functions.php to remove the homepage check.

As I can’t do it by just declaring a function with the same name (function_exists is not checked in custom.php) I need to add a new action and remove the original. However, it doesn’t seem to work with remove_action( 'get_header', 'revolutionslider_top', 1 ); and I get two identical sliders on homepage. Should I use remove_action differently?

Thanks in advance!

Veikko

  • The forum ‘Virtue Theme’ is closed to new topics and replies.