• Resolved squeaker2

    (@squeaker2)


    Is it possible to save the_title() or the_content() or any of the following into a variable for LATER use in the loop, such as an echo statement? When I save them into a variable it seems they want to display on the screen before the echo statement takes place, so they aren’t contained by the content that is meant to be echo’ed first. To fix this, i did get_the_title() and get_the_content() into a variable, but I can’t do this with category/tags, because I want them to be linked to the proper sorting in the url automatically.

    Maybe it would be possible to do something such as…
    I am new to wordpress so this syntax will be beyond terrible. Just an outline.

    $postedTags = get_the_tags();
    for each tag IN $postedTags {
    add tag permalink to tag
    }

    Sorry, I am only a year into coding, and wordpress is pretty advanced for me. Any help would be greatly appreciated.

The topic ‘Saving the_functions() into variables ??’ is closed to new replies.