• Resolved syntaxfree

    (@syntaxfree)


    Hi, does anyone know how to move the post meta from the top of the post to below the content? Blog Posts – Archive Layout – Post Item Layout doesn’t allow repositioning of the post elements.

    I see that for other themes e.g. GeneratePress the same question has been answered by using a short code snippet using hooks and actions, but I’m not a coder and find it difficult to adapt the GeneratePress snippet to suit Kadence. I’ve scoured the Kadence support forums and documentation already but couldn’t find anything beyond this post. Can anyone help?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author Ben Ritner – Kadence WP

    (@britner)

    Hey,

    You can first turn off the elements using the options: https://share.getcloudapp.com/BluYWRZL

    You can use a snippet like this:

    add_action( 'kadence_single_after_inner_content', 'custom_add_meta_after_content' );
    function custom_add_meta_after_content() {
    	if ( is_single() ) {
     		get_template_part( 'template-parts/title/meta', get_post_type() );
    	}
    }

    Ben

    Thread Starter syntaxfree

    (@syntaxfree)

    Thank you very much! This works great when displaying single posts, but I’m still not seeing the post meta under the post when posts are displayed on the home page or any archive page.

    What snippet could I use to have the post meta appear under the post no matter where the post appears?

    As I view tags as part of the post meta, I am also trying to get them to appear under the post no matter where the post appears. (They currently appear only under single posts but not in archive layouts.) Any help with that would be really appreciated too!

    Theme Author Ben Ritner – Kadence WP

    (@britner)

    With the latest update I made this a little easier. You can use a hook like this

    remove_action( 'kadence_loop_entry_header', 'Kadence\loop_entry_meta', 30 );
    add_action( 'kadence_loop_entry_content', 'Kadence\loop_entry_meta', 35 );

    I’m looking into adding a tags option for the archives.

    Ben

    Thread Starter syntaxfree

    (@syntaxfree)

    Thanks for your help and for considering a tags option for the archives.

    I added the code from your most recent post as a code snippet and it didn’t seem to work – meta was not appearing under posts in archive layout.

    I then tried turning on the visibility of the meta element in the customiser, and then the meta appeared under the posts. But it also appears at the top of each post now! Should I use CSS to hide it at the top, or is there a better way to address this?

    • This reply was modified 4 years ago by syntaxfree.
    Theme Author Ben Ritner – Kadence WP

    (@britner)

    Hey,
    That code I sent should remove the first call for meta already so you shouldn’t need to hide it in the css.

    Are you adding this code in a child theme or a code snippet plugin?

    Ben

    Thread Starter syntaxfree

    (@syntaxfree)

    Hi, thanks for your reply. I added this code in the Code Snippets plugin as I understand from the Kadence knowledge base that this is the recommended route.

    Just to summarize, my current setup is as follows:

    I have both code snippets you provided activated in the Code Snippets plugin and the following settings in the customiser:

    Single post layout:
    – in Title Elements, visibility of meta is off
    – RESULT: as mentioned previously, this works well for single posts! Post meta only appears at the bottom of single posts.

    Archive Layout:
    – in Post Item Elements, if visibility of meta is off, post meta appears nowhere
    – in Post Item Elements, if visibility of meta is on, post meta appears at top and bottom
    – RESULT: in any archive layout, I’m still not able to move the meta the way I could for single posts

    • This reply was modified 4 years ago by syntaxfree.
    Theme Author Ben Ritner – Kadence WP

    (@britner)

    Hey,
    The visibility does have to be turned on in the archive settings. I’m not sure why the remove action wasn’t working for you.

    Here is something you can try perhaps it was getting called to early.

    add_action( 'init', 'custom_changes_to_archive_meta');
    function custom_changes_to_archive_meta() {
    remove_action( 'kadence_loop_entry_header', 'Kadence\loop_entry_meta', 30 );
    add_action( 'kadence_loop_entry_content', 'Kadence\loop_entry_meta', 35 );
    }

    Let me know if that resolves it.

    Ben

    Thread Starter syntaxfree

    (@syntaxfree)

    Awesome, the latest solution works for the archive post layout! Thank you so much, I really appreciate that you kept checking back here until it was resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Move post meta from top to bottom’ is closed to new replies.