[Support request] Hook wp_head (custom title)

Home Forums Support [Support request] Hook wp_head (custom title)

Home Forums Support Hook wp_head (custom title)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1577653
    Oliver

    Hi,

    I have one question regarding a hook I created for wp_head.

    I want to display a custom title on post pages which is based on some PHP variables. The variables itself are based on an array of values from “Advanced Custom Fields”.

    My solution:

    <?php

    // PHP code for the arrays

    // Display custom title

    echo “<title>” . $var_1 . ” text ” . $var_2 . ” text ” . $var_3 . ” text</title> “;

    ?>

    Everything is working as expected, the title is also displayed correctly inside wp_head, but now I have 2 title tags.

    How would I replace the regular wp_title and use my custom hook INSTEAD of wp_title?

    Thanks for your help…

    #1577775
    Leo
    Staff
    Customer Support
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.