• Hello forum
    I’m working on a twentyeleven child theme, with four custom post types. I made the mistake of not enabling excerpts when I set up the CPTs, but now I need the theme to display excerpts.
    All the content, several hundred posts, was imported from a tables-based site before enabling excepts. However, none of these imported posts have an excerpt. Instead, they display the word “Array”.
    Custom posts created after excerpts were enabled display fine, as do non-imported posts. I’ve tested using other themes, and the same thing happens. These affected posts all have the word “Array” in the database for their excerpt; I’m guessing, if there’s a solution, it involves the database.
    Writing a custom excerpt for every post is not an option.
    Any ideas? Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter mbain

    (@markcbain)

    Managed to solve this myself. Just in case anyone else is looking for the solution, it’s basically enough to delete the content of the post_excerpt field, and, without content, the excerpt will display correctly.
    I ran a “search and replace” via mySQL, using this query:

    UPDATE wp_posts SET post_content = REPLACE (
    post_content,
    'Item to replace here',
    'Replacement text here');

Viewing 1 replies (of 1 total)
  • The topic ‘Excerpts not working on custom posts’ is closed to new replies.