I’m going to build my first Child Theme. I understood how to override functions (hope!), but how to override variables?
For example, in a Premium Template I want to change the values of feed variables shown in functions.php:

$app_rss_feed = 'http://xxx.rss';
$app_twitter_rss_feed = 'http://yyy.rss';
$app_forum_rss_feed = 'http://zzz.rss';

But if I create my functions.php file inside my child theme and assign a different RSS feed value to these variables… nothing happens.
So, which is the right way to change variables?

2 Answers
2

I’m mobile, so this will be short.

Use the after_setup_theme hook to add a function to set those variables. Declare them as global inside that function before setting them.

Hope that helps.

If anybody wants to add an example to this answer before I get home, feel free. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *