Top

wptobbe on "Queried posts and edit this entry doesn’t get along"

May 27, 2010 by  

I have a static frontpage where i have four textfields which i want to be editable in the simplest way possible.

Each of these fields are divs in which i call for a specific post (query) to be shown and have a link to edit it (Edit this entry), and the code i am using is:

<?php
$post_id = 26;
$queried_post = get_post($post_id);
?>
<h2><?php echo $queried_post->post_title; ?></h2>
<?php echo $queried_post->post_content; ?>
<?php edit_post_link( $link, $before, $after, $id ); ?>

Everything is working fine and the posts i call for are shown like they should, but when i press “edit this entry” i’m directed to the page editor, not the post editor.
What i’m asking for is really how i get the link to go to the right place?

The point is to make it easy to edit for clients, and i have tried the most plugins that seem sensible. The closest one was Front End Editor, but it has some strange habit of putting my text into columns i don’t want. Front page editor is really the best choice if i could get it to work.

Share

Comments

Facebook comments:

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





*
Bottom