Howdy, @nourmoubayed!
To have content only show up using a hook on a specific post, you would need to use a condition to check that you’re on that post before outputting your content. The first thing you’ll need to do is get the ID of your post, which happens to be 30023 in this case. You can find this either in the WordPress admin for the post, or by inspecting the frontend of your site using the developer tools of your browser and looking for the dynamic class on the <body>
that references the page/post ID. Once you have this ID, you can then do something like the following in the functions.php
file of your child theme:
function my_custom_content() {
if ( get_the_ID() == 30023 ) {
echo 'My custom content.';
}
}
add_action( 'x_before_the_content_end', 'my_custom_content' );
Here we’re hooking our custom output into the x_before_the_content_end
action using our function, and inside that function using get_the_ID()
to check if ID of the current page/post matches the page we’re looking to target. If it does, we can then output our custom content.
You can utilize this in conjunction with whatever custom code you’re already using to output your author shortcode and make adjustments as necessary.
Cheers!