views:

76

answers:

2

Hi I have a problem in my site on which am working on localhost. I am using pretty urls in my localhost.I have custom page templates for all the sites every page has a different header and footer and the content in it.

I used

<div class="btn_container"><a href="issues/?page_id=1038" class="btn_1" title="Food"></a></div>
<div class="btn_container"><a href="index.php?cat=155" class="btn_3"  title="Health"></a></div> 

The Problem I have to get request parameters in wordpress and query the db against these request query string parameters. And also it does not route to this page template.

I have hard-coded URL like in the above divs.

Please help

A: 

A page template is assigned to the page through the admin panel: 1. Go to the admin panel 2. click on pages 3. choose the page you have created 4. choose the template on the right hand side.

Simply linking to it does not assign the template to the page like your example is showing.

Jason
I have assigned the page template which am using, but rather going to this page template it goes to page.php .But My major problem is that I have when I click on any link I have to take this link id to the next page and query the db based on this request param.Please tell me the way how can Do this. Thanks
junjua
A: 

Could you simply grab the link id from the URL like

$link_id = $_GET['page_id']; // this would equal 1038 from your example link
Jason