Site logo

Archived topic

Custom header in child theme

14 replies · Started by Alexander Babaev on August 13, 2018

Viewing posts 1–15 of 15

Hello, dear developers!
Prehistory: I have a table:

<table>
<tr>
<td  <?php if( wp_is_mobile() ){ ?> width=20% <?php } else { ?>width=10% height="100" <?php } ?> align="left">
<a href="/"><img src="/mylogo.png" alt="SITE TITLE" title="TO MAIN" <?php if( wp_is_mobile() ){ ?> width="50" height="50" <?php } else { ?>width="100" height="100" <?php } ?> border=0 /></a>
</td>
<td <?php if( wp_is_mobile() ){ ?>width="80%"<?php } else { ?>width="90%"<?php } ?> align="left">
<?php if( wp_is_mobile() ){ ?><span class="sitesubtitle_m"><?php } else {?><span class="sitesubtitle"><?php } ?>Subtitle</span>
<br>
<?php if( wp_is_mobile() ){ ?><span class="sitetitle_m"><?php } else {?><span class="sitetitle"><?php } ?>Site title</span>
</td>
</tr>
</table>

which I use as a website header. In Customizer I disabled the title and subtitle display, as well as all the logos, and insert the table into the GP HOOKS before header content. Today i want to disable GP Hooks and for replace logo i created GP child theme.

Problem: Which file and how should I replace it so that the table is displayed correctly?

I heard that GP Premium 1.7 is coming out soon with the updated Page Haders. Will there be an opportunity to write your own title with an unidentified logo and the name of the site in the Site Identity?

I found a way (it seems). So in the functions.php file of child theme, I realized the idea:

add_action( 'generate_before_header','medcolthm_header' );  
function medcolthm_header() { ?>
  <table>
<tr>
<td  <?php if( wp_is_mobile() ){ ?> width=20% <?php } else { ?>width=10% height="100" <?php } ?> align="left">
<a href="/"><img src="/mylogo.png" alt="SITE TITLE" title="TO MAIN" <?php if( wp_is_mobile() ){ ?> width="50" height="50" <?php } else { ?>width="100" height="100" <?php } ?> border=0 /></a>
</td>
<td <?php if( wp_is_mobile() ){ ?>width="80%"<?php } else { ?>width="90%"<?php } ?> align="left">
<?php if( wp_is_mobile() ){ ?><span class="sitesubtitle_m"><?php } else {?><span class="sitesubtitle"><?php } ?>Subtitle</span>
<br>
<?php if( wp_is_mobile() ){ ?><span class="sitetitle_m"><?php } else {?><span class="sitetitle"><?php } ?>Site title</span>
</td>
</tr>
</table>  
<?php }

Is this the right decision or can I have problems later?

When GP 1.7 will realised, approximately?

Sorry I might be misunderstanding something here.

Let me explain you with pictures.
At the moment when creating Page Header, I have
Step 1
Step 2
Step 3
Step 4

What I want to do.

I remind you that the website does not have a logo, and the display of the name and slug is disabled.

Let me know if this helps

Sorry, but not. It isnt work =(

Thanks! I have no question at this time!)

No problem :)

This archived topic is closed to new replies.