如何在帖子的作者姓名下方添加一个 Div 按钮


How do I add a Div button below the author name on posts?

我有按钮的 HTML。但我想把它放在每个帖子标题的底部。我在函数中找到了处理我的标题的区域,但显然有一种特殊方法可以将按钮代码放入函数中,但我无法弄清楚。希望你能帮助我,以下是所有信息:

---> 我的按钮代码:

<div class="cb-tip-button" data-content-location="" data-href="//www.coinbase.com/tip_buttons/show_tip" data-to-user-id="52958dae01e73713d400002d"></div>
<script>!function(d,s,id) {var js,cjs=d.getElementsByTagName(s)[0],e=d.getElementById(id);if(e){return;}js=d.createElement(s);js.id=id;js.src="https://www.coinbase.com/assets/tips.js";cjs.parentNode.insertBefore(js,cjs);}(document, 'script', 'coinbase-tips');</script>

----> 这是我在该领域的主题功能。我强调了我认为它必须到期的部分:http://pastebin.com/XyB9yx1m

-----> 附上一张图片,上面是我希望按钮的外观。

我的图片

试试这个:

<header class="entry-header">
    <?php if (
        fearless_get_option( 'singular_featured_image_enabled' )
            && 'audio' != $format
            && 'gallery' != $format
            && 'video' != $format
        ) {
            fearless_post_thumbnail();
        }
    ?>
    <h1 class="entry-title"><?php single_post_title(); ?></h1>
    <?php
    printf(
        apply_atomic_shortcode(
            'entry_byline',
            '<div class="entry-byline">' . __( 'By [entry-author]   [entry-published]  ', 'fearless' ) . '</div>'
        ),
        sprintf(
            _n(
                '1 View',
                '%1$s Views',
                get_post_meta( get_the_ID(), 'Views', true ),
                'fearless'
            ),
            get_post_meta( get_the_ID(), 'Views', true )
        )
    );
    ?>
<div class="cb-tip-button" data-content-location="" data-href="//www.coinbase.com/tip_buttons/show_tip" data-to-user-id="52958dae01e73713d400002d"></div>
<script>!function(d,s,id) {var js,cjs=d.getElementsByTagName(s)[0],e=d.getElementById(id);if(e){return;}js=d.createElement(s);js.id=id;js.src="https://www.coinbase.com/assets/tips.js";cjs.parentNode.insertBefore(js,cjs);}(document, 'script', 'coinbase-tips');</script>
</header><!-- .entry-header -->

现在应该添加到标题中。

它只需要在标签的末尾上方</header>