• I might be missing something obvious, but I see no way to write an excerpt for a page. I’m using exerpts for “questions” that need answering – i.e. putting the question into the excerpt field, with the answer in the text body.

    Any way to do this?

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Are you using the the_excerpt in your template or the_content?

    https://codex.www.ads-software.com/Template_Tags/the_excerpt

    Another option would be to simply ask the question in the post, and use the <!–more–> quicktag to force them to look at the whole post.

    Thread Starter diretribe

    (@diretribe)

    Sorry, think it wasn’t clear enough. I’m trying to do this on pages – i.e. Write -> Page.

    I guess could do this using posts, however I have arranged the site to include posts as “additions” to the development of answers. Q/A pages consist of this structure…

    ;begin
    Question
    – excerpt

    Answer
    – main page text

    Blog posts
    – list of relevant blog info/posts, updating with new relevant information
    ;end

    I **can** use the_excerpt(); to output it but it simply generates the top-bit of the page. I know there is space in the DB for this – as pages are stored as posts, I suspect it may just be the case that there is no form space to enter it in.

    Thread Starter diretribe

    (@diretribe)

    Ok, solved my own problem by copying the form-excerpt field from edit-form-advanced, and using it to create a plugin attached to the edit_page_form action.

    Sorted.

    Very clever!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Writing excerpt for page…’ is closed to new replies.