WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pass the_title() into variable (3 posts)

  1. vaprak
    Member
    Posted 7 years ago #

    Does anyone know of a way to get the value of the_title() into a variable.

    I'd like to do some conditional formatting based on whether different words appear in the post title.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    $variable = the_title('','',false);

  3. vaprak
    Member
    Posted 7 years ago #

    Thank you, sir.

    Works perfectly.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags