• Hello! Does anyone know how to move the article date and category from the bottom of articles to beneath the heading (like on the McLuhan theme)?

    I want to keep the tags at the bottom, just want to move the date and category to the top. Again, just like the McLuhan theme.

    I tried looking through the forum in case someone else had asked but couldn’t find anything. Apologies if I’ve missed it.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @vikrantpelia,

    It’s possible, but not without adding custom code in a child theme. Eksell includes an action called eksell_entry_header_end that you can hook into to output code at the end of the entry header (below the entry title).

    You can then hide the date and category output from the meta section below the content with custom CSS.

    — Anders

    Thread Starter vikrantpelia

    (@vikrantpelia)

    Many thanks, @anlino.

    I’ve created the child theme but unfortunately that’s as far as my capabilities are taking me for this. Can you please explain where exactly I need to add that action and in which file? I most probably can do it, just need a little guidance to help me get there.

    Many thanks in advance!

    Vikrant

    Theme Author Anders Norén

    (@anlino)

    Hi @vikrantpelia,

    Insert the code below in the functions.php file in your child theme (or create that file in the child theme folder, and add the string <?php on the first line):

    function eksell_child_register_maybe_output_post_meta_single() {
    
    	global $post;
    
    	if ( $post && eksell_get_post_meta( $post->ID, 'single' ) ) {
    		add_action( 'eksell_entry_header_end', 'eksell_maybe_output_post_meta_single' );
    	}
    	
    }
    add_action( 'wp_head', 'eksell_child_register_maybe_output_post_meta_single' );

    That will insert a duplicate of the post meta below the title of the post. Next, you can hide the post meta items you don’t want visible in that location (like the tags) with CSS.

    — Anders

    Thread Starter vikrantpelia

    (@vikrantpelia)

    You’re a star, @anlino! Thank you so much.

    I just need your help with a few tweaks, please. I tried to figure them out myself but no luck.

    1) How can I add some spacing between the post title and post meta?
    2) How can I change the post meta font colour and size? I want to style it like the original footer meta – so it’s grey and smaller than the body copy.
    3) How can I remove the word “Published” before the date?
    4) How can I stop the date from being a link?

    Many thanks in advance. I owe you a coffee!

    Vikrant

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shift article date and category under heading’ is closed to new replies.