• Hey!

    I’m trying to find a plugin or code so I can add page excerpts automatically on one parent page.

    For example:
    Co workers
    – Co worker #1
    – Co worker #2

    Then I want it to automatically include all content (it will be a photo and some text) in “Co worker #1” and “Co worker #2” on the Co workers page.

    Tried so many plugins but can’t find the right one or they are outdated.

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter malevolentia

    (@malevolentia)

    For example it seems like this plugin is what I’m looking for EXCEPT that it only works to be used in a sidebar:
    https://www.ads-software.com/plugins/page-excerpt-widget/

    But it’s outdated?

    • This reply was modified 7 years, 10 months ago by malevolentia.
    Moderator bcworkz

    (@bcworkz)

    Simple, well written plugins can perform properly years beyond their last updated date. The fact it’s a widget is a bit of a problem. You could create a custom page template that includes a “sidebar” area that is styled as part of the main page instead of a traditional area off to the side. Use register_sidebar() to tell WP to include this new area in the widget admin screens so you can add the plugin’s widget to your new area.

    Or you can simply use the plugin code as a reference on how to do certain things, like query for descendent’s of the current page. This is likely done with the WP_Query class. If you supply the current page ID as the “post_parent” argument and “page” as the “post_type” argument, the returned object will have the pages you want.

    Then loop through the object’s posts as shown in examples and output the post excerpt field.

    Thread Starter malevolentia

    (@malevolentia)

    Thank you so much for your answer, appreciate it!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page excerpts, how to add?’ is closed to new replies.