Change get_header function of the plugin without hardcoding plugin core files
-
Hello!
I’m developing my own theme for an e-learning purpose, and I’m using LearnPress.
The thing is, users need to get a different header when they are logged in. Ok, i’ve already done this change on the whole theme, but the
<?php get_header()?>
function on the theme layouts for single, archive, etc are overwriting my changes.I need to overwrite the function
<?php get_header()?>
without editing and hardcoding plugin core files, how can I do it?I just need to say “make that”
<?php get_header()?>
get this one:function logged_users_header() { if ( is_user_logged_in() ) { get_header('logged'); } else { get_header(); } }
I’ve already inserted this snippet on my functions.php: it worked on the theme pages, not on the plugin pages
Somebody could help me?
- The topic ‘Change get_header function of the plugin without hardcoding plugin core files’ is closed to new replies.