I am currently using the Onepress theme and want to edit the header section, the part that prints the site title. However, I cannot for the love of life figure out which part actually controls the header. Header.php does not show anything and neither does the frontpage template.
In WP, you first need to understand the template hierarchy https://developer.wordpress.org/themes/basics/template-hierarchy/
So as per hierarchy,
-- front-page.php
-- home.php / custom page template.
If you have front-page.php , then please check which header file it is enqueuing.
If there is no front-page.php then check home.php exist in your theme file. If yes check which header file it is enqueuing .
If it doesn't have both file, goto Appearance >> Customise >> Static Front Page.
So if it has some template name in Front Page then you need to check in your template file for which header file it is adding.
Header File
For header file, if they are using get_header(), then it will use header.php from your active theme.
If it has get_header( 'home' ); then it will use header-home.php
So from there you can go customise your header.
Also if you are using child theme , then please make check if it has header related file in your child theme or not.
Thanks
header.php
orindex.php
files, this is not always the case - and without knowing with the specific theme, your question is difficult for our community members to answer. For this reason, questions regarding 3rd-party plugins and themes are considered off-topic here. You can try to rephrase your question in a more general format, but it would probably be best addressed in the 3rd-party's official support channels. – bosco Jul 22 '16 at 20:09get_header()
function inindex.php
(and/or another top-level template) to loadheader.php
orheader-{something}.php
. If the theme uses it's own loading logic however - then you'll probably have to dig or ask the author. You could try to search for the functions that print the site title in the theme directory, I guess .Usuallyget_bloginfo()
orbloginfo()
. – bosco Jul 22 '16 at 20:23onepress_site_header()
andonepress_site_logo()
functions ininc/template-tags.php
. The hint was that the theme is usingdo_action()
calls where the site header should be - searching for the action tags in the theme revealed theadd_action()
calls that execute functions there. Instead of editing the functions, you could alternately use the Plugin API to detach those action hooks and add your own functions in their place. – bosco Jul 22 '16 at 20:35