Thread Starter
Rohil
(@rohilmistry)
Sorry If you did not get me.But At the start of the page it should show all the store list.But after loading, when I click on the More Details, It should take me to the new page where that clicked store should be shown.
I have modified wpsl-gmap.js little bit and added more details with anchor tag in html
. So by doing this my href
of my anchor tag becomes like ?wpsl-id=1
Thats what I did.But when I click on that More Details, it is redirecting me to index page with url like this localhost/wordpress/?wpsl-id=1
.
So How can I do it to achieve desired result ?
Please give any suggestion.I am trying to achieve it for past two days without any success.
Thread Starter
Rohil
(@rohilmistry)
What I have did so far is added following code to the class-front.php at top :
function themeslug_query_vars( $qvars ) {
$qvars[] = 'wpsl_id';
return $qvars;
}
add_filter( 'query_vars', 'themeslug_query_vars' , 10, 1 );
add_filter('template_include', 'my_template', 1, 1);
function my_template($template){
global $wp_query;
global $wp;
//$paged = ( get_query_var( 'wpsl_id' ) ) ? get_query_var( 'wpsl_id' ) : 1;
if ($wp->query_vars["wpsl_id"] == '3'){
$template = WPSL_URL.'page-wpsl_id.php';
}
else{
$template = WPSL_URL.'frontend/templates/store-listings-aroma.php';
}
return $template;
}
But it is giving me the error. Is there any other way to do it ? Or how can I improve this ?
I’m a friends place for the next three days, so I don’t have time to get into the details now. But the next version I’m working on will support custom post types, so each store can get an unique url showing data for that single store.
If you can email me at info at tijmensmit.com then I can send you the beta once I get back home.
Thread Starter
Rohil
(@rohilmistry)
Okay I will mail you but can you atleast tell me am I doing it in correct way ?Or else I should choose other way ? Because I can not wait for three days 🙂 Its really important for me to finish it today otherwise I will loose my job 🙁
Please guide me to the right way.
Thread Starter
Rohil
(@rohilmistry)
Here you have mentioned on way to do it.Can you please explain little bit more ??
Sorry If I am disturbing you but is there anyway to do it ? Because I want to stick with this great plugin.
Used that plugin and It deserves more than 5 stars.
Can you also give me beta version just for testing purpose ?
@nhrk you can email me at info at tijmensmit.com, and I can send the beta once I have fixed a few remaining issues.