This topic contains 11 reply and 3 voices, and was last updated by saku4388 6 years, 1 month ago
Viewing 11 Posts - 1 through 11 (of 11 total)
Author Posts
September 11, 2013 at 9:11 pm 8028
saku4388 Hi Tareq. I am having an issue with my site and it need to be checked by you. But i don't think giving the site credentials and login details on forum is a good idea. Could you please tell me how to share something with you. Thanks 'n' Regards, Shabir Virk
September 11, 2013 at 9:14 pm 8029
Mahi Mahi

Hello Shabir,

Mark reply as private is totally safe and sound here. If you still dont want to share here please email to – support at wedevs dot com

September 11, 2013 at 10:02 pm 8030
saku4388 saku4388 This reply has been marked as private.
September 14, 2013 at 6:20 pm 8145
saku4388 saku4388

i m still waiting for the response

September 14, 2013 at 10:17 pm 8150
Tareq Hasan Tareq Hasan

Can you paste your dashboard code in pastebin?

Your own code’s delete button will not work because it doesn’t have the [wpuf_dashboad] shortcode and so the delete code won’t execute. Try to copy the delete link code from the dashboard.

September 15, 2013 at 1:10 pm 8190
saku4388 saku4388

Hi here it is

i already copied both the edit and delete button from the “frontend-dashboard.php” and it is not working.

I think it is because of the class “class WPUF_Frontend_Dashboard”

Please solve this ASAP bro.

Thanks ‘n’ Regards,
Shabir Virk

September 15, 2013 at 2:44 pm 8191
Tareq Hasan Tareq Hasan

I think you didn’t added nonce field wpuf_del in this format: wp_nonce_url( $del_url, 'wpuf_del' )

September 15, 2013 at 2:47 pm 8192
saku4388 saku4388

Nop. i added check the line 101

I am sure this is definitely the issue of class. because this is working

this one is your frontend-dashboard.php file

You can see clearly all the code is same the only thing which is different is my code is in the class WPUF_Frontend_Dashboard class

September 15, 2013 at 2:56 pm 8194
Tareq Hasan Tareq Hasan

[php]if ( isset( $_REQUEST[‘action’] ) && $_REQUEST[‘action’] == "del" ) {

This only works when you use the shortcode, otherwise you’ve to copy the delete_post() function too to make it work.

September 15, 2013 at 3:26 pm 8195
saku4388 saku4388

Tareq 🙁

It is not working.

i tried but still the page refresh and the post wont delete.

here is my code which i placed above my dashboard code.

could you please give me the code which i need to place or the function to work it.

i can’t live my site without this function.. so please help me out man. otherwise my whole project is gonna stuck 🙁

Thanks ‘n’ Regards,
Shabir Virk

September 16, 2013 at 7:48 am 8198
Tareq Hasan Tareq Hasan

Putting the delete code should just work fine. But I am not sure what are you doing wrong.

if ( isset( $_REQUEST[‘action’] ) && $_REQUEST[‘action’] == "del" ) {
$nonce = $_REQUEST[‘_wpnonce’];
if ( !wp_verify_nonce( $nonce, ‘wpuf_del’ ) ) {
die( "Security check" );

//check, if the requested user is the post author
$maybe_delete = get_post( $_REQUEST[‘pid’] );

if ( ($maybe_delete->post_author == $userdata->ID) || current_user_can( ‘delete_others_pages’ ) ) {
wp_delete_post( $_REQUEST[‘pid’] );

$redirect = add_query_arg( array(‘msg’ => ‘deleted’), get_permalink() );
wp_redirect( $redirect );
} else {
echo ‘<div class="error">’ . __( ‘You are not the post author. Cheeting huh!’, ‘wpuf’ ) . ‘</div>’;

September 16, 2013 at 9:37 am 8210
saku4388 saku4388

I Solved the problem 🙂

Actually the problem was i export the posts from my site to localhost and don’t know somehow the Forms are not attached with the post.

So i manually select the post and give them a proper Form ID. and its work like charm. 🙂

The only thing i want to know is, the posts are not going in the wordpress trash.

May i know why? or this is just happening to me.

Actually i m providing the deals to the users and i just want when they delete it, the post will go into a category (in my case it is Expired) so search engine can still access it.

Otherwise there are lots of pages with good SEO which will be deleted when a user delete a post.

So if there is nothing that can move the post to the Expired Category, all i just need is it goes into the trash so i can then restore it and move into the Expired Category.

Thanks ‘n’ Regards,
Shabir Virk

Viewing 11 Posts - 1 through 11 (of 11 total)