Forum Replies Created

Viewing 10 replies - 106 through 115 (of 115 total)
  • This seems to be the only way to get any response from you…

    I am still awaiting my refund. You should really stop giving out that email address for support, unfortunately it seems that the team does not have the ability to respond to emails that are sent.

    Moderators, thank you for your the advice.

    I have this same problem. I have selected the after option but the upload form still remains on top. Please advise. Thank you.

    Thread Starter shemakeswebsites

    (@shemakeswebsites)

    Thank you. Sorry I was not able to find a way to create a ticket within my dashboard earlier. I followed the link and created a ticket there.

    Thread Starter shemakeswebsites

    (@shemakeswebsites)

    Oh my word, I spoke too soon!

    So with the current_time(‘timestamp’) it displays, but it does not hide it after the time limit is reached. Grrrr….

    EDIT: I got it. It was the comments again. Edited the single quote and now it’s good!! YAY!!

    Thread Starter shemakeswebsites

    (@shemakeswebsites)

    Oh my gosh. It worked!!

    Thank you so much once again. I wouldn’t have thought to do that. The strange thing is that both sites are the same server. My dev site is just built into a subdomain. Maybe that makes things a bit wonky.

    I’m on my way! I really think that was the last of my hangups with my site. Thanks for being such a great help.

    Thread Starter shemakeswebsites

    (@shemakeswebsites)

    Hello again. ??

    It appears that I have found myself in another rut.

    Thanks to your help, I’ve got the code to work perfectly on my development site. I just moved things over to my live site and my code just isn’t working. I’ve found that it I remove the time checks then it works…but the time check is important. These are the codes I’m using in my single.php file:

    <div class="post-edit"><span class="edit-post">
    <?php //allows author to edit post up to 10 minutes after it is published 
    if ( (int) get_the_date('U', get_the_ID()) > time() - 600 && (is_user_logged_in() && $post->post_author == $current_user->ID)) {
        echo '<a href="https://www.website.com/posts">Edit Post</a>';
        }else{
    ?>
    <style type="text/css">.post-edit{
    display:none;
    }</style>
    <?php
    }
    ?></span></div>
    
    <div class="post-delete"><span class="delete-post">
    <?php // allows author to delete post up to 5 minutes after it is published
     if ( (int) get_the_date('U', get_the_ID()) > time() - 300 && (is_user_logged_in() && $current_user->ID == $post->post_author)) {
    echo '<a onclick="return confirm(\'Are you SURE you want to delete this post?\');" href="' . get_delete_post_link( $post->ID ) . '">Delete post</a>';
    }else{
    ?>
    <style type="text/css">.post-delete{
    display:none;
    }</style>
    <?php
    }?>
    </span></div>
    

    Can you think of any reason at all that I would have an issue with this? I checked the user capabilities, and everything looks good. But once a post is made, by default it’s just hidden from the “else” function. I’m at a loss and although I searched a lot online locating someone with a similar issue is very hard to find.

    Thread Starter shemakeswebsites

    (@shemakeswebsites)

    Thread Starter shemakeswebsites

    (@shemakeswebsites)

    Thank you again so very much. I really appreciate your help!

    Thread Starter shemakeswebsites

    (@shemakeswebsites)

    Hello again @bcworkz. I was wondering if you might be able to assist me again.

    In addition to the “Post Edit” link that you helped me with, I want to do the same with a delete option. However, I haven’t been able to get it to work properly. I think it may be an issue with my commenting, single vs double quotes, backslashes, etc. But I haven’t had any luck. I appreciate any help you can offer.

    Here’s the code I’m trying to use:

    <div  class="post-delete"><span class="delete-post">
    <?php if ( (int) get_the_date('U', get_the_ID()) > time() - 2800 && (is_user_logged_in() && $current_user->ID == $post->post_author)) {
        echo ' <p><a onclick="return confirm("Are you SURE you want to delete this post?");" href="<?php echo get_delete_post_link( $post->ID ) ?>">Delete post</a></p>';
    }else{
    ?>
    <style type="text/css">.post-delete{
    display:none;
    }</style>
    <?php
    }?>
    </span></div>

    While using the code above, the “delete post” link shows, but I get a 404 page because the link actually leads to: <?php echo get_delete_post_link( $post->ID ) ?> instead of the on-click function and delete action.

    Thread Starter shemakeswebsites

    (@shemakeswebsites)

    Oh my goodness, thank you so very much!! I was able to utilize this perfectly. I didn’t delve into the additional grace period after an edit. If I couldn’t get to this point on my own, I certainly won’t be able to figure that part out. But what you’ve provided will definitely suffice.

    Thank you again!!

Viewing 10 replies - 106 through 115 (of 115 total)