[Resolved] How to change the position of META info and add the end line

Home Forums Support [Resolved] How to change the position of META info and add the end line

Home Forums Support How to change the position of META info and add the end line

Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
    Posts
  • #1350542
    nutt

    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]

    #1350708
    nutt

    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]

    #1350709
    David
    Staff
    Customer Support

    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

    #1350714
    nutt

    Done, what’s next?

    Thank you so much

    #1350720
    David
    Staff
    Customer Support

    Now add this to your after_content hook element and check execute PHP:

    <?php
    if ( function_exists( 'sharing_display' ) ) {
        sharing_display( '', true );
    }
    ?>
    #1350725
    nutt

    Ok. Done

    #1350729
    David
    Staff
    Customer Support

    hmmm… have you checked Execute PHP in the Hook ?
    If so – are there any warnings in the Element?

    #1350731
    nutt

    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]

    #1350745
    David
    Staff
    Customer Support

    I can see the Date is displayed below the title.
    Adding this PHP function should move it below the content:

    https://generatepress.com/forums/topic/how-to-change-the-position-of-meta-info-and-add-the-end-line/#post-1349616

    #1350750
    nutt

    Those codes made the date disappeared both positions

    #1350757
    David
    Staff
    Customer Support

    What happens if you remove this piece of the code?

    add_filter( 'generate_header_entry_meta_items', function() {
        return '';
    } );
    #1350761
    nutt

    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… _/|\_

    #1350771
    David
    Staff
    Customer Support

    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.

Viewing 13 posts - 16 through 28 (of 28 total)
  • You must be logged in to reply to this topic.