Tagged Questions
1
vote
0answers
38 views
Using a page template without a page
Does anyone know if it's possible to use a page template on a URL, even if a page doesn't exist for that page?
When building sites, I create the relevant pages to ensure use of the templates, but ...
1
vote
1answer
211 views
Passing parameters to a custom page template using clean urls
I am now passing parameters to a custom template in the following format
www.example.com/?pageid=12&rid=24&title=this-is-the-title
I have created two tables . So I need to fetch data and ...
0
votes
4answers
1k views
Wordpress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
I've encountered a strange error while developing a custom theme.
After finishing editing the template for a custom post type single view, I passed onto working at the template files for pages and I ...
1
vote
2answers
433 views
add_rewrite_rule and template redirect not working
I have a strange problem , I have the following pairs :
add_rewrite_rule('^questions/ask/?','index.php?pagename=ask','top');
if(is_page('ask')){
$tname = 'add-question.php';
...
6
votes
1answer
4k views
How to create custom URL routes?
I have a very peculiar requirement, hopefully I can explain it without being too confusing. I created a page template where I list some properties I get from an external XML file, so far no problems, ...
1
vote
1answer
2k views
How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
This answer provides the code for a query that returns an OR match on a taxonomy term:
global $query_string;
$args['tax_query'] = array(
array(
'taxonomy' => 'status'
,'terms' ...
1
vote
2answers
392 views
Create built-in pages without creating actual pages
For example:
site.com/contact (or site.com/?page=contact if not using permalinks)
when someone goes to that page I want to load a theme template, like page-contact.php
But I don't want to create a ...
2
votes
2answers
521 views
Preventing index.php?category_name=something from redirecting
I'm trying to filter posts in a category by the year of the post's date. I also want to do this without being redirected to the year template so my ideal URL would be ...