WordPress.org

Ready to get started?Download WordPress

Forums

Front-end Editor
[resolved] Front end editor unable to edit a second loop on a page. (7 posts)

  1. schmackLab
    Member
    Posted 3 years ago #

    I have a modified page template wherein there is a standard page loop that pulls data from the page editor. There is also another loop that pulls a custom posttype/taxonomy. All the information from the standard page loop is fully editable but anything pulled in with the second loop is untouchable.

    The plugin works great other than this but I am having this same problem on multiple sites.

    Thanks for any help!

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Please paste the code for the second loop. (If it's really long, use something like pastebin.com)

  3. schmackLab
    Member
    Posted 3 years ago #

    Here's a link to the code on pastebin: http://pastebin.com/MLtKEsHE

    The loop works fine and does what it's supposed to. But the plugin only edits content on the front end that comes through the generic page loop.

    Thanks for taking a look! I appreciate it.

  4. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Ah, I remembered why this doesn't work.

    FEE checks in_the_loop() before making those fields editable. This is to avoid other problems.

    If you really want to make this work, you will have to use query_posts() instead.

    Don't forget to call wp_reset_query() when you're done.

  5. schmackLab
    Member
    Posted 3 years ago #

    Awesome, thanks!

    I just dropped this bit into the loop above:

    <?php  global $wp_query;
    $wp_query->in_the_loop = true; ?>

    And now it works perfectly. Thanks for the help!

  6. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Heh, I guess that's one way to do it. :)

    You're welcome.

  7. llamaman
    Member
    Posted 2 years ago #

    @Scribu, I love your Front-End Editor plugin!

    I realize this post is over a year old, but I am experiencing the same issue that @ schmackLab was. I attempted to insert @schmackLab's code in various places, but I cannot get the Front-End Editor plugin to edit a custom query that is being called from a plugin.

    My custom loop is here: http://pastebin.com/w6ZHrUGc

    Any thoughts on how to resolve this?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic