• Is there a way to have “edit” links on blog posts when viewing your blog for the Swell Lite theme? I am logged into WordPress.

    I don’t see them thus far. I really hope people check this forum lol.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    The simplest way to have an edit link when you’re logged in and viewing the post would be to go to your profile in the WordPress dashboard and make sure you have the admin bar (toolbar) enabled. It will provide a link for editing the post. Otherwise…

    This would actually take a theme edit. You’ll need to be using a child theme. https://codex.wordpress.org/Child_Themes In your child theme, you can copy the “content/loop-post.php” file to the same structural location and your theme will use that file instead of the one in the parent theme.

    From the new loop-post.php file in your child theme, find this line:

    <!-- BEGIN .post-meta -->

    Add the following directly ABOVE it:

    <?php edit_post_link(__("(Edit)", 'swelllite'), '', ''); ?>

    Thread Starter folliclethought

    (@folliclethought)

    Sean,
    I really appreciate your help. I’m extremely new to coding and developing, but I did create the Child Theme.

    From there I do not know what to do next. Do I need to find something from the parent theme and copy it and paste it to Child’s theme?

    If you could explain that process I’d appreciate it.

    Thread Starter folliclethought

    (@folliclethought)

    OK,

    So for Sean or anyone, this is what I still require to know.

    -Where do I find the content/loop-post.php file

    -In detail, where do I need to put that?

    -What program can I use to open and view php files. I’m on Windows 7 and my comp told me it could not view a php file that I downloaded.

    ps.- I have a new found fascination and appreciation with coding now. I remember when I was 13 and the internet was still ‘new’ I dabbled with Geocities (remember that?) and thought maybe I wanted to be a hacker. Then my brother said something negative about computers and it turned me off to it. Just a random thought. But you guys,…. you guys who know what you’re doing, that’s pretty cool. I applaud it.

    Thanks guys.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to have edit link on posts when viewing your site’ is closed to new replies.