• Hi,

    I’d like to be able to write something like
    <!--include#123-->
    to include the text of article with ID 123 in another article.

    I only found a plugin to include page content in my templates – but not in other articles.

    Any way to do this?
    Thanks,
    pq

Viewing 5 replies - 1 through 5 (of 5 total)
  • A small PHP script with some SQL code should do the trick.
    Write a function to query the ‘posts’ table and include it where you want.
    It’s crude but it should work 🙂

    It ought not be too hard to modify the “page in page” plugin to use posts instead of pages.

    This one works with posts or Pages:
    http://guff.szub.net/get-a-post

    Thread Starter pressing_questions

    (@pressing_questions)

    Thanks for you replies.
    All these things use php-tags to include new content – but I can’t write <?php ?> in my articles.
    Additionally, there should be a way to include multiple articles in one go to reduce database queries, e.g.
    <!--include123,124,125-->
    which would then translate to one additional query.

    You need to use a plugin like RunPHP, or The Execution of All Things, to run PHP inside the body of your posts.

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

The topic ‘Include articles in other articles’ is closed to new replies.