Hi,
in the theme settings at "Post Meta Information" I activated the "edit" option.
This works fine concerning posts.
But what can I do or change where, so that I have an "edit" link at pages at the frontend, too?
Thanks.
Hi,
in the theme settings at "Post Meta Information" I activated the "edit" option.
This works fine concerning posts.
But what can I do or change where, so that I have an "edit" link at pages at the frontend, too?
Thanks.
add this to functions.php of a child theme:
function editlink_pages ( $content ) {
global $post;
if (is_page() && current_user_can( 'edit_page', $post->ID ))
return '<a href="'.get_edit_post_link() . '">Edit</a>' . $content;
else
return $content;
}
add_filter('the_content', 'editlink_pages');works fine, thank you.
oh no, don't work :-(
As I wanted to save such an edited page, I get the error message:
"Warning: Cannot modify header information - headers already sent by (output started at /homepages/25/d13574400/htdocs/multisites/wp-content/themes/bfnav_bch/functions.php:79) in /homepages/25/d13574400/htdocs/multisites/wp-includes/pluggable.php on line 890"
and the screen remains white :-(
Any idea?
Thanks
sorry, my fault ... I killed a bracket too much in the functions.php
that's probably an extra space at the end/beginning of the functions file. it usually is with this error message...
ok, thank you, I'll keep an eye on it in future.
You must log in to post.