投稿ページのコンテンツエリア<div class="c-postContent p-entry__content">
タグの直前にHTMLを挿入したい場合に利用します。
Arkhe Toolkitでシェアボタンを表示している場合には、シェアボタンが表示された下部に、このアクションフックを経由したHTMLが出力されます。
関数の第1引数の優先順を上げることで、シェアボタンよりも先に(上に)出力することは可能です。
ソースコード
<?php
add_action(
'arkhe_before_entry_content',
function( $the_id ) {
?>
<a class="c-ta-action-hook-point p-arkhe_before_entry_content c-blinking" href="<?php echo esc_url( home_url( '/arkhe_before_entry_content' ) ); ?>" role="button">arkhe_before_entry_content / このページの記事IDは<?php echo esc_attr( $the_id ); ?>です</a>
<?php
},
10,
1
);