• Hi, the front end plug-in is amazing! I’ve been looking for something like this for a LONG time.

    But I had a question. If I am using the multiple content blocks plugin, how can I edit that content? If that is not possible what if I create a child page and include that page in its parent? Will I be able to edit that text?

    Any insight would be great!

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • If you’re using The Loop to display the child page, it should be editable:

    query_posts(array('post_parent' => $post->ID));
    
    while ( $loop->has_posts() ) : $loop->the_post();
        the_content();
    endwhile;
    
    wp_reset_query();

    Also, you might want to weigh in the [editable] shortcode idea.

    Thread Starter acondiff

    (@acondiff)

    Thanks for the reply. I will create child pages if I need to, but that seems like a bad way to do this. My client will have access to the admin area and those extra pages might confuse them, because they will be mixed in with other pages.

    Are you familiar with the MultiEdit plugin? Some of the blocks of text are editable, but not all. I think it is dependent on whether or not they are in the loop. But for the blocks that are, you double click to edit, and the text that is inside the text box created by the plugin is not the same text that was there before I double-clicked it. It is actually the main text instead of the text for that block. This is probably because the block is contained inside of the pages loop.

    But is there any other way to do this so that the block is editable?

    Thanks again.

    Thread Starter acondiff

    (@acondiff)

    Hmmm… I did a little research and could I get the same result if I used custom fields instead of the Multiple Content Blocks plugin?

    Thread Starter acondiff

    (@acondiff)

    Ok well I found out that I need to use this inside the loop:
    <?php editable_post_meta($post->ID, ‘my_key’, ‘rich’); ?>

    The funny thing is, it is editable outside of the loop but when I put it inside the loop it adds a fee div and then a div after containing my custom field value. The text is not editable when this code is placed inside the loop.

    Do you have any idea why this is?

    Thread Starter acondiff

    (@acondiff)

    false alarm…i guess i cant have the code inside <h4> tags.

    Thread Starter acondiff

    (@acondiff)

    i did resolve this issue as mentioned above. in my email i was referring to how to fix the tooltip bug (the tooltip does not display the left two rounded corners on a firefox and safari on a mac and the text wraps to two lines in firefox on a mac). I was just wondering if you could tell me how I could fix this issue. if I need to I will wait until the next update. =)

    Oh, right…

    The tooltips are handled by qTip, so not sure how to fix it yet.

    It’s probably caused by your theme, though.

    Getting Front-end Editor to work with Multiple content blocks is rather easy. To get it working you just need to modify the source of Multiple content blocks plugin a bit.

    Just replace line 236 and 245 of multiple_content.php with:

    echo apply_filters('post_meta', $content, $post->ID, '_ot_multiplecontent_box-' . $blockName, 'rich', true);

    and

    return apply_filters('post_meta', $content, $post->ID, '_ot_multiplecontent_box-' . $blockName, 'rich', true);

    respectively.

    Cheers!
    Reimund Trost

    @reimund: I wish I could vote-up your answer. ??

    @scribu ??

    One more thing. You probably want to treat the content blocks more like the_content, meaning you’ll want to have paragraphs wrapped in <p> elements. The easiest way to do this is to modify the Front-end Editor plugin. Simply add the following line:

    $new_value = wpautop($new_value);

    somewhere in the beginning of the save function of the FEE_Field_Meta class (fields/post.php around line 540).

    Perhaps this could be an option in a future version of FEE?

    Good luck!
    Reimund Trost

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Front-end Editor] Edit Content Blocks’ is closed to new replies.