• moozastyle

    (@moozastyle)


    Hey there,

    i am working with the “tag cloud” and when clicking on one of the tags, a new page with the title of the tag clicked on does open.

    The title of that page is only the name of the Tag. For example: “Tagname”

    But i want to change the pages title into “bla bla bla: Tagname” (blablabla is only an example sentence)

    So i have to change the archive.php where i found the title that tagpages will get.

    I changed it from

    elseif ( is_tag() ) :
    single_tag_title();

    to:

    elseif ( is_tag() ) :
    printf( __( 'blablabla: %s', 'profitmag' ), '<span>' . get_tag() . '</span>' );

    But i get some kind of php errors for the function “get_tag”. I think get_tag is no the right choice in here.

    php error:

    WARNING: MISSING ARGUMENT 1 FOR GET_TAG(), CALLED IN /HOME/U682086413/PUBLIC_HTML/WP-CONTENT/THEMES/PROFITMAG/ARCHIVE.PHP ON LINE 34 AND DEFINED IN /HOME/U682086413/PUBLIC_HTML/WP-INCLUDES/CATEGORY.PHP ON LINE 290

    CATCHABLE FATAL ERROR: OBJECT OF CLASS WP_ERROR COULD NOT BE CONVERTED TO STRING IN /HOME/U682086413/PUBLIC_HTML/WP-CONTENT/THEMES/PROFITMAG/ARCHIVE.PHP ON LINE 34

    Do you know what function i have to use, in order to get the name of the tag in there?

    Thank you

  • The topic ‘Title of Tag – Pages’ is closed to new replies.