• Resolved cmaj

    (@cmaj)


    Hi

    How do I move the post meta of a single post above post’s title? Can I override any of the actions to do that?

    regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • Link to site?

    Thread Starter cmaj

    (@cmaj)

    Hi,
    Try adding this bit of code to your child theme’s functions.php

    add_action ('__before_body' , 'move_single_post_metas');
    
    function move_single_post_metas() {
      //checks if we are displaying a single post. Returns false if not.
      if ( ! is_single() )
        return;
      remove_action  ( '__after_content_title' , array( TC_post_metas::$instance , 'tc_set_post_metas_hooks' ), 20);
    
      add_action ('__before_content_title' , array( TC_post_metas::$instance , 'tc_set_post_metas_hooks'), 10);
     }
    Thread Starter cmaj

    (@cmaj)

    Works like a charm, thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to move post meta before post title?’ is closed to new replies.