Turning the WordPress Edit links into a Bootstrap Button

Quick tutorial to show you how to add a WordPress filter to add classes to the WordPress edit post link. We will add some Bootstrap classes to the edit post link to make them into buttons and follow our Bootstrap WordPress theme trend.

Steps

  1. Open the extras.php file in the /inc/ directory
  2. At the bottom of this file, add the following code:

  3. Save the file and view the new edit post links on the front-end of your site. Feel free to edit the Bootstrap classes to make the edit post links look however you would like.

Notes from the Video

You can find the different Bootstrap button classes to change the color and size here.

Feedback

Please let me know what you think of this tutorial and if you need help with anything.

  • Robert Wolfe

    Why is the Posted In and Leave a Comment not displaying in your video?

    • Where in the video are you talking about? I see the comments link throughout the whole video?

    • AlexxSo

      They are there actually, but they are in a different position. The “Posted in” (e.g. Sticky) and the “Leave a comment” anchors are not anymore below the post, but they are in the, let’s call it “post meta” part, which is above each post, next to the date and author, in the same line. Both have been changed in appearance and have icons and different colors etc. I guess it works, more or less, the same way as explained in one of the previous tutorials, see here: https://bootstrapwp.com/customizing-wordpress-post-meta/

      • AlexxSo

        Whoops.. I just realized that this will be done in the next tutorial, actually. Sorry 🙂

  • Zaid S. Jihad

    Hi, I am using the

    class, How to use “if statement” to show the button for only the authorized members?

    • This sounds like a custom implementation that is outside of the scope of this tutorial. “Authorized members” could mean a lot of different things… You can check to see if the user is logged in with a built-in WordPress function: https://codex.wordpress.org/Function_Reference/is_user_logged_in

      Moving forward please ask your support questions in the forum if they are in scope. Thanks!

      • Zaid S. Jihad

        You just missed understand me. 🙂
        Please Check the two pictures, I just want the .footer-panel class to show up only when the admin is logged in.

  • ernesto

    Hi Brad,
    I fallow all the tutorial but i have an issue my site is not responsive and the the drop down menu is not working, I downloaded your original files and copy exactly as you show on the videos.Please some help
    my site is http://www.ernestohc.com
    thanks

    • If you just copied everything, you probably missed a step. Just looking at your site, it seems you have done a lot of customizations and aren’t really building the base theme these tutorials are going over how to build. It is hard for me to determine where you might have gone wrong. You have a lot of custom markup.

      • ernesto

        I give up before starting customizing just 4 episodes to the end of the Tut serie. I was looking for the completed file at the last episode (firt serie)but i could not find it so i wonder if you can send me the file to see where is the problem.
        I really need to solve this problem.
        Really appreciate

        • Use the contact for or send me an email explaining what file you are looking for. Thanks

          • ernesto

            Thanks for the quick response,
            I would like to have the complete folder for series one Base theme please.
            That way I can start series Two in a good shape.
            Many Thanks
            My email gastronomo76@gmail.com