Custom post types using content.php have stray pipe before Edit link #192

Closed
andrewryno opened this Issue Mar 26, 2013 · 1 comment

Projects

None yet

1 participant

@andrewryno

This is a rather minor annoyance, but I always seem to have to fix it so it doesn't look awkward for authors/admins/etc.

For a CPT, when using the default content.php file in the loop with no categories, tags, or comments there is an extra pipe (|) before the Edit link.

Changing the bottom of content.php to this fixes it:

<?php $sep = ( 'post' == get_post_type() ) ? '<span class="sep"> | </span>' : ''; ?>
<?php edit_post_link( __( 'Edit', '_s' ), $sep . '<span class="edit-link">', '</span>' ); ?>

When the post type is post, there is almost always (more than 90% probably) some content before the edit link, whether it's simply the 'Uncategorized' link, a tag, or something. That can be turned off by _s_categorized_blog returning false, but that's not the default.

Thoughts? I can submit a pull request if necessary.

@andrewryno

Actually, this is kind of a duplicate of #72 (that issue would solve this one). Closing.

@andrewryno andrewryno closed this Mar 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment