Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Here is my situation, I'm trying to create my first plugin for Wordpress, but I'm having an issue of trying to change the display within the plugin admin page.

Here is what I currently have:

enter image description here

As you can see I have a couple links on the new page. What I want to do is to change what is being displayed in the window when I click on a link.

If this has been asked, I'm sorry, please point me to the post, but I'm not sure how to word what I'm trying to do. I want to be able to change the view based on links that are clicked. So if I wanted to add a customer, I could click on the 'Add Customer' link, and the display a form to add the user, all the while maintaining the admin portion (the links of the left).

I hope this makes sense.

share|improve this question
    
You need to add a query to your link then check it with $_GET in your php file. –  Waldermort Oct 11 '13 at 18:36

1 Answer 1

up vote 1 down vote accepted

The easiest way is to add another $_GET parameter to the URL. In the moment you are viewing admin.php?page=Customer_Search. You could make your links go like admin.php?page=Customer_Search&type=your-page.

In your plugins files you can then output the desired content based on that parameter.

if($_GET['type'] == 'your-page') {
   //output your page ...
}elseif( ....other pages ...
share|improve this answer
    
I think that about did it! Thank you for the help! –  Blaine Oct 11 '13 at 18:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.