Support

Account

Home Forums General Issues Place Custom Icon and Entry Title at the Same Line

Unread

Place Custom Icon and Entry Title at the Same Line

  • I want to put a Custom Icon before Post Title (content-archive.php)
    I tried using these code
    Theme Code:

    <header class="entry-header">
    <?php
    the_title( '<h2 ' . hybridextend_get_attr( 'entry-title' ) . '>
    <a href="' . esc_url( get_permalink() ) . '" rel="bookmark" itemprop="url">', '</a> </h2>' ); ?>
    </header>

    ACF Code:

    <?php
    $image = get_field('custom_icon');
    if( !empty( $image ) ): ?>
    <img src="<?php echo esc_url($image['url']); ?>" alt="<?php echo esc_attr($image['alt']); ?>" />
    <?php endif; ?>

    I tried the ACF code below <header class=”entry-header”>
    But the icon is showing above the Post Title, but I want to show the Icon and Post Title should be the same line.

Viewing 1 post (of 1 total)

The topic ‘Place Custom Icon and Entry Title at the Same Line’ is closed to new replies.