Jump to content

[SOLVED] Link Help Please


jrp91384

Recommended Posts

Hello,

 

Situation: I’m trying to link to another page from within a page. I have my pages within one file. How do you link to another page or function? Each page’s content is within its own function. I want to link the first list item (Definitions) to the page definitions page.

 

Sorry if I have not explained my question very well. I’m a complete beginner of php and it’s a bit over my head. Just trying to create a small plugin for WP.

 

Any help is greatly appreciated!

Thanks

 

 


add_submenu_page( __FILE__, 'xxx Center Overview', 'Overview', 5, __FILE__, 'vis_page_overview');
add_submenu_page( __FILE__, 'Admin Menu Definitions', 'Definitions', 5, 'definitions', 'vis_definitions');


//================================
// Overview Page Content
//================================
function vis_page_overview() {
echo '
<div class="wrap">
     <p id="icon-edit" class="icon32"><h2>xxx Center Overview</h2></p>
 <p>Below you will find instructions on how to perform common tasks that are specific to your site.</p>
     <div class="vis-box1">
   <div class="box-heading">Quick Links</div>
   <ul>
         <li><a href="#">Definitions</a></li>
         <li><a href="#">Pages</a></li>
         <li><a href="#">Sidebar</a></li>
         <li><a href="#">Footer</a></li>
         <li><a href="#">Copyright</a></li>
         <li><a href="#">xhtml Tags</a></li>
       </ul>
 </div>
     <div class="vis-box2">
   <div class="box-heading">Accounts</div>
 </div>
 <div class="vis-box3">
   <div class="box-heading">Tutorials</div>
 </div>
 <div class="vis-box4">
   <div class="box-heading">Help</div>
 </div>	 
</div>
';
}


//================================
//  Definitions Page Content
//================================
function vis_definitions() {
echo '
<div class="wrap speclists">
<a name="top" id="top"></a>
     <p id="icon-edit-comments" class="icon32"><h2>Admin Menu Definitions:</h2><p>
 <p>

etc....etc....

 

Link to comment
Share on other sites

Look through the code for a call to vis_definitions() that has a conditional check before it for some post or get value. something like:

if ($_GET['page'] == "definitions")
   vis_definitions();

 

Whatever that check is, that is how you want to link to the page. If it is how I stated, then your link code would be like this:

<li><a href="?page=definitions">Definitions</a></li>

 

If you can't figure it out from that, post the code where you find the call to vi_definitions and someone can help you more.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.