0

This is my edit link in template file

$edit_link=add_query_arg( 'ser_edit', $post_id, $edit_link ) ;

This is my html code.

 <a href="<?php  print $edit_link;?>"><?php _e('Edit','wpestate');?></a>

When I change first parameter in add_query_arg, It works fine but ser_edit is the correct parameter for that. But it display blank page when I click on edit link in html. I checked console, no error. Anybody has any idea??

It display correct url in browser but display total blank page. When I change key parameter, it works fine. So how to solve this??

5
  • After adding the query arg, what does $edit_link look like? Commented Nov 5, 2014 at 5:55
  • @Anand see my edit above Commented Nov 5, 2014 at 5:57
  • Have you checked your web server's error logs to see if there's a 500 Internal Server error being thrown? Also try enabling WP_DEBUG in wp-config.php and it may give some more clues. Commented Nov 5, 2014 at 6:02
  • No 500 error in error log. wp_debug is already true. Also put error_reporting code in config.php Commented Nov 5, 2014 at 6:03
  • When I try browsing to the link you've provided in your post, I get redirected to plotsup.com/plotsup_plot/url Commented Nov 5, 2014 at 6:09

1 Answer 1

1

try this

if you want to pass single value in query arg

add_query_arg( 'ser_edit',$post_id,get_permalink() ) ;

And if you want to pass multiple value in query arg

add_query_arg(array('arg1'=>'value1','arg2'=>'value2'), get_permalink());
Sign up to request clarification or add additional context in comments.

1 Comment

I have problem with ser_edit i.e key in add_query_arg. When I change it to another, it works fine. But ser_edit is correct key for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.