Site logo

Archived topic

How can I add some static data below Author name and post updated date?

5 replies · Started by Jijin on November 23, 2020

Viewing posts 1–6 of 6

Hi

I want to add some static data below the author name in post page.

Something like,

Published by Author Name On Post date
Data with a link to our page

I have tried with your PHP snippets, but I couldn't get the order same like Author name then date and then static data below it.

And the date was coming below the static data when tried to inject some HTML on that PHP snippet from your forum here.

Hi there,

can you share a link to your site so i can see your current layout?

It is fixed, thank you.

I would like to know one more thing, can we keep the author section after the featured image, keeping title first, followed by featured image and then author name.

What Tom suggested was the code to move featured image above Title in blog post listing page, and where I need is on post page.

That code will apply to both the archives and the single posts.
If you only want it on the archives then try this:

add_action( 'wp', function() {
    if ( !is_single() ) {
        remove_action( 'generate_after_entry_title', 'generate_post_meta' );
        add_action( 'generate_after_entry_header', 'generate_post_meta', 15 );
    }
} );
This archived topic is closed to new replies.