Archived topic
Merge 2 hooks into one
3 replies · Started by Hilton on December 3, 2019
Viewing posts 1–4 of 4
Hi,
I'd like to know if there is a way to merge these 2 hooks into only one. Both have the same configuration and display rules:
<?php if ( is_author( '16' ) ) : ?>
<div class="mbf-job-title">Nutritionist CFD 332554</div>
<?php endif; ?>
<?php if ( is_author( '15' ) ) : ?>
<div class="mbf-job-title">Cardiologist - CGD 553109</div>
<?php endif; ?>
Thanks
Hi there,
Like under the same hook element?
If so you should be able to just combine them like this:
<?php if ( is_author( '16' ) ) : ?>
<div class="mbf-job-title">Nutritionist CFD 332554</div>
<?php endif; ?>
<?php if ( is_author( '15' ) ) : ?>
<div class="mbf-job-title">Cardiologist - CGD 553109</div>
<?php endif; ?>
Thanks Leo.
No problem :)
This archived topic is closed to new replies.