Viewing 4 replies - 1 through 4 (of 4 total)
  • Any content I insert in the genesis_title Hook field appears after the closing title tag.

    Yes, that’s the way hooks work. If you want to alter the post title use the genesis_post_title_text filter in your theme functions file – https://genesistutorials.com/function/page/3/?g_filters=show&g_hooks=show

    Thread Starter mswas

    (@mswas)

    OK I will try that, Ron.

    I was going by the description that says “This hook executes between the main document <title></title> tags.” That should be changed to say “after”.

    Thanks!!

    the main document <title></title> tags.

    Those are not your post title. The document title is in the head of the page (vs the content of the page).

    Thread Starter mswas

    (@mswas)

    I did realize we were talking about different things when I clicked your link. This is the solution I went with:

    add_filter( 'wp_title', function( $old_title ) {
    	return sprintf( '%s | %s by %s Book Review', $old_title, get_field( 'book_title' ), get_field( 'book_author' ) );
    }, 20 );
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘genesis_title Hook content showing after’ is closed to new replies.