Support » Theme: GeneratePress » EDIT button missing

  • Resolved nealumphred

    (@nealumphred)


    I switched to the GeneratePress theme and love the way it looks but the EDIT button that I am used to having on the front-end of my published posts is missing.

    • Is this an error or an intentional part of the theme?

    • Can I add an EDIT button to my posts?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Leo

    (@leohsiang)

    Hi there,

    That’s handled by WordPress and the Edit Post should definitely be there:
    https://www.screencast.com/t/b7U1pI7h

    Any chance you can disable all plugins to eliminate conflicts from other plugins first?

    Let me know 🙂

    nealumphred

    (@nealumphred)

    LEO

    Thanks for the prompt response!

    I do not mean the EDIT button on the admin bar.

    I used the TwentySeventeen for years. On the front-end of a published post, there was an EDIT button toward the bottom of each post. Clicking on that button allowed me to enter the back-end and make changes.

    That Edit option is missing on my published posts with GeneratePress.

    Is there a way to include screenshots here on the WordPress.org forums?

    NEAL

    Leo

    (@leohsiang)

    You can use a service like this and provide the direct links here:
    https://postimages.org/

    nealumphred

    (@nealumphred)

    L

    Coo-well! I have never used this before!

    Here is a post using Twenty Seventeen with the Edit button:
    https://postimg.cc/ctQr2hWg

    Here is the same post using GeneratePress without the Edit button:
    https://postimg.cc/TyTG1Gw6

    Hope this helps …

    N

    Theme Author Tom

    (@edge22)

    Hi there,

    We opted not to include the edit link, as it’s already in the admin bar.

    However, you can add it back yourself with a function:

    add_action( 'generate_after_content', function() {
        if ( is_singular() ) {
            echo get_edit_post_link();
        }
    } );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Let me know if you need more info 🙂

    nealumphred

    (@nealumphred)

    TOM

    Thanks but that did not work. I added the code to the Code Snippets plugin and all that happened was a URL appeared at the end of the content on my published post:

    https://www.elvis-atouchofgold.com/wp-admin/post.php?post=48320&action=edit

    What next?

    NEAL

    David

    (@diggeddy)

    Hi there,

    try this function instead:

    add_action( 'generate_after_content', function() {
        if ( is_singular() ) {
            edit_post_link( __( 'Edit', 'generatepress' ), '<p>', '</p>' );
        }
    } );
    nealumphred

    (@nealumphred)

    DAVID

    Bravo!

    That worked—it added the word “Edit” to the lower-left corner of each post, between the Category and the Comments section.

    Thanks and keep on keepin’ on!

    NEAL

    David

    (@diggeddy)

    Glad we could be of help

    nealumphred

    (@nealumphred)

    D

    If you decide to do a survey, put me down as the first vote to restore the button as a default/automatic part of the free GeneratePress theme.

    N

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘EDIT button missing’ is closed to new replies.