[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 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #1349601
    nutt

    I would like META info (date and author) from below title to end of the content and add the line just like
    -> seths.blog

    Thank you

    #1349604
    nutt

    Both archive page and post page

    Thank you

    #1349616
    David
    Staff
    Customer Support

    Hi there,

    you can use this snippet to add the meta to the footer:

    add_filter( 'generate_footer_entry_meta_items', function() {
        return array(
            'date',
            'author',
            'post-navigation',
        );
    } );

    and add this to remove any meta below the title:

    add_filter( 'generate_header_entry_meta_items', function() {
        return '';
    } );

    Make sure Date and Author are set to display for them to show.

    After thats done – share a link to your site and ill take a look at the CSS for styling.

    #1349624
    Rohan Verma

    Hi. How can show the tags list after the single post? By default it was showing previously but right now not showing. You can check out the site: https://www.gadgetheadline.com/

    Thanks in advance.

    #1349653
    nutt

    Thank you so much David

    this is my site -> https://nuttblog.com

    this is the position I want the META to be
    [img]https://sv1.picz.in.th/images/2020/07/02/5gRIHJ.jpg[/img]

    and I want them to show in archive page (front page) as well

    #1349668
    David
    Staff
    Customer Support

    Hi Rohan – can you raise a separate topic and we will assist directly.

    JJ – can you make sure you have Author and Date meta set to display for Archives in Customizer > Layout > Blog?

    How is the Social Share added to the site ? Can it be added using a shortcode ? If so use that method and it to the after_content hook using a hook element

    #1349974
    nutt

    Date and Author are set to display for archive already but it doesn’t show.

    Social share is from jetpack plugin which I don’t know how to change the position of it

    Thank you David

    #1350087
    Leo
    Staff
    Customer Support

    Are you using any other functions for the meta? Can you link us to the page in question?

    Social share is from jetpack plugin which I don’t know how to change the position of it

    You will need to check with JetPack’s support to see if there is a way to insert the social share content using a function or shortcode so we can add it using hook and order it the way you want.

    #1350090
    nutt

    This is what it said in Jetpack

    “By default, the sharing icons will display right at the bottom of your post’s content. You may want to move it elsewhere in your post, such as right before the content.

    To do this, in your functions.php file, add the following:

    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' );

    Then find the file for the location where you’d like the sharing icons to appear. Insert the following code in the area you want the Sharing or Likes buttons to appear:

    if ( function_exists( 'sharing_display' ) ) {
        sharing_display( '', true );
    }
     
    if ( class_exists( 'Jetpack_Likes' ) ) {
        $custom_likes = new Jetpack_Likes;
        echo $custom_likes->post_likes( '' );
    }
    add_action( 'loop_start', 'jptweak_remove_share' );

    Please note that this is provided as a courtesy and we do not provide support for implementing or editing custom code.”

    Can you tell me where to put the code in GP?

    Thank you so much

    #1350182
    nutt

    This is what I would like it to look like

    1. one border separator line right at the end of the post (Archive page and Post page)
    2. The date displayed under the line
    3. Social Share under the line

    Thank you so much 🙂
    [img]https://sv1.picz.in.th/images/2020/07/03/5i9vfn.jpg[/img]

    #1350513
    nutt

    Please help

    #1350532
    David
    Staff
    Customer Support

    Add this code:

    if ( function_exists( 'sharing_display' ) ) {
        sharing_display( '', true );
    }

    to the after_content hook in a hook element. Make sure to Check Execute PHP and set your display rules. That will place the shares below.

    Can you enable the post meta to display?

    #1350533
    nutt

    I already enable post meta but it doesn’t show, I don’t know why?

    #1350535
    David
    Staff
    Customer Support

    Can you remove any custom functions for the post meta you have added apart form those related to Jetpack.

    #1350538
    nutt

    Done but the latest code didn’t work too

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