• Resolved latz

    (@latz)


    I want to check if a post contains the <!– more –> tag. At the moment I’m using a quite dissatisfying solution:

    if (strpos(get_the_content('^&amp;^&amp;'), '^&amp;^&amp;') > 0)

    since I have to retrieve the post from the DB again. Isn’t there any function or global variable indicating that the post uses the more tag?

Viewing 2 replies - 1 through 2 (of 2 total)
  • MichaelH

    (@michaelh)

    Should be able to use something like this if in a post loop
    $pos=strpos($post->post_content, '<!--more-->');

    ;( stupid forum still mangling ampersands

    Thread Starter latz

    (@latz)

    Thank you, this works fine.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Check for more tag’ is closed to new replies.