Archived topic
How to change the position of META info and add the end line
27 replies · Started by nutt on July 2, 2020
Let forget about social button
Can you help me with separator line and the date below like this
[img]https://sv1.picz.in.th/images/2020/07/03/5RKoVI.jpg[/img]
The code you sent previously, I insert to the hook and it shows like this
[img]http://image.free.in.th/v/2013/im/200703025042.jpg[/img]
Ok lets see if we can get the Shares moved first.
Add just this function:
function jptweak_remove_share() {
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );
if ( class_exists( 'Jetpack_Likes' ) ) {
remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
}
}
add_action( 'loop_start', 'jptweak_remove_share' );
And make sure that removes the Share Icons first.
Let me know
Done, what's next?
Thank you so much
Now add this to your after_content hook element and check execute PHP:
<?php
if ( function_exists( 'sharing_display' ) ) {
sharing_display( '', true );
}
?>
Ok. Done
hmmm... have you checked Execute PHP in the Hook ?
If so - are there any warnings in the Element?
No warning, the social shares just came back as you see -> https://nuttblog.com
as I say.. all I want is to put the date below the line like this ... please forget about social button for seconds, I can uninstall the plugin for that.
Please help me solve the date problem only
[img]https://sv1.picz.in.th/images/2020/07/03/5RUz8D.jpg[/img]
I can see the Date is displayed below the title.
Adding this PHP function should move it below the content:
Those codes made the date disappeared both positions
What happens if you remove this piece of the code?
add_filter( 'generate_header_entry_meta_items', function() {
return '';
} );
The date came back to the default position.
Hey, David ...That's all right, I think I better give up on this.
I never thought this can be so complicated. I am sorry for taking up so much of your time.
I am really appreciated for your kind help. Thank you very much... _/|\_
Really sorry - it shouldn't be this difficult.
There must be something different on your site that is effecting the post meta display and how PHP is executed.