[Resolved] Merge 2 hooks into one

Home Forums Support Merge 2 hooks into one

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1091892
    Hilton

    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

    #1091994
    Leo
    Staff
    Customer Support

    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; ?>
    #1092009
    Hilton

    Thanks Leo.

    #1092088
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.