Hi there,
I have a few files that I'm placing into child theme - but they will not over-ride the main theme. The "includes/func.php" is the main one right now. How do I force the child theme to over-ride that file being called from the main theme?
The child theme will override only the template files i.e. which generate some html on the website.
The func.php file contains the functions and functions cannot be overridden like this. There are hooks i.e. actions and filters which can be used to make changes in the functions. If there is no action or filter available in the function then it cannot be overridden.
So, for example, I would like to change the "Login" link that appears when someone tries to take a course (see screengrab:
http://prntscr.com/dmhm5q ) . Currently, it takes a user to the standard WP login screen, but I want it to take them to a login page instead (
http://www.saferelationships-safechildren.ca/sign-in/ ), to be more professional.
For this you just need to change the $link_html in the code, and there is already a filter available on this variable i.e. "wplms_registeration_page".
Add the bellow code in your functions.php file of child theme.
add_filter('wplms_registeration_page','wplms_custom_login_link_non_loggedin_users');
function wplms_custom_login_link_non_loggedin_users($link_html){
$link_html = '<a href="http://www.saferelationships-safechildren.ca/sign-in/" class="link"> '.__(' LOGIN','vibe').'</a> | <a href="'.wp_registration_url().'" class="link"> '.__(' REGISTER NOW','vibe').'</a>';
return $link_html;
}