• Resolved felr

    (@felr)


    I’d like to migrate to a newer layout of my website, so I have to adapt the wordpress layouts as well.

    For this purpose, I’d require to retrieve the first 50 or so letters from the blog text, but ideally *without any formatting or images* embedded in it.
    Unfortunately, “the_content()” gives me everything, including all formatting and images.

    Any suggestion on how to do that, is there an alternative? (I can’t use ‘excerpt’ as most of my articles contain any)

    Also, this doesn’t work:
    $str = wordwrap(strip_tags(the_content(‘Weiterlesen »’)), 28);
    $str = explode(“\n”, $str);
    print $str[0] . ‘…’;

    thanks,
    felr

    • This topic was modified 4 years, 7 months ago by felr. Reason: added non-working php code

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Retrieve first 50 letters of blog text (ideally w/o images)’ is closed to new replies.