• Resolved ginji

    (@ginji)


    I added a new theme which is called “The Glass People 2.0”. The problem is that it has no “Edit Post” text when I view my full blog entry. How do I add it?

Viewing 11 replies - 1 through 11 (of 11 total)
  • look at the way it is done inside the default theme:

    <?php edit_post_link(__('Edit This')); ?>

    and edit the theme files accordingly.

    Thread Starter ginji

    (@ginji)

    I’ve added it to page.php but it still won’t show.

    You have to be logged into the admin panel.

    Thread Starter ginji

    (@ginji)

    I am.

    Try to use just a normal text like:

    <?php edit_post_link('edit','',''); ?>

    Works well for me. Don’t forget to put it into your Loop!

    Thread Starter ginji

    (@ginji)

    My loop? Where’s the loop? My page has the following:

    <?php get_header(); ?>
    
    <!-- content ................................. -->
    <div id="content">
    
    <?php if (have_posts()) : ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
    		<h2><?php the_title(); ?></h2>
    
    		<?php the_content(); ?>
    <?php edit_post_link('edit','',''); ?>
    <?php endwhile; ?>
    <?php endif; ?>
    
    </div> <!-- /content -->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    I’ve added it to page.php…
    Wrong! The page.php file is used by WP to display Pages not your posts. You should add the code to your theme’s index.php.

    Thread Starter ginji

    (@ginji)

    Oh, thanks. But how would I add it into the full article?

    Define “full article”.
    And learn about the Template_Hierarchy.

    Thread Starter ginji

    (@ginji)

    Single Post page, I think.

    Follow the link… (and never post back without reading the resources offered!)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How do I add “edit post” to my posts?’ is closed to new replies.