The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
252 views

Redirect all page templates to index.php and turning Wordpress into a Single Page Application CMS

I’m trying to push the boundaries of Wordpress by turning it into a SPA CMS. Everything works fine until now except for a redirection issue. github angularpresstheme How it works: When I create a ...
0
votes
0answers
31 views

How can run the multiple website sites or domains into single wordpress intallation

I want to run multiple sites into wordpress 3.8.1, when the user access my website the url and language of my website is auto change to its country by it's ip address of user and website will also be ...
0
votes
0answers
17 views

How can I limit posts when using template_redirect?

I'm trying to redirect a query (http://example.com/custom-post-type/?action=create) to a template file (page.php) while also replacing the_content. I've more or less gotten it to work. But the end ...
0
votes
2answers
425 views

redirect wp-login.php to another page

I would like to redirect this page wp-login.php to /login page. So when a user clicks on a link like this <a href="/wp-login.php">login</a>, wordpress will redirect him to /register . I ...
0
votes
1answer
38 views

Google indexed pages for one page site

I have created a one page site with wordpress. The basic idea used was to combine pages and their templates into index.php. The problem is that when crawlers work on the site, they get the links for ...
0
votes
2answers
53 views

Redirect returning users to a certain page?

Is there a way to redirect users returning to the site who are already logged in? Assuming something like: function returning_redirect() { //code here } add_action('auth_cookie_valid', ...
0
votes
0answers
102 views

WP_Redirect on User Region - GeoIP

I have a main homepage for my site and will have several other 'homepages' for different countries in the future. I am trying to redirect the user to the right 'homepage' for their country based on ...
0
votes
1answer
52 views

Add custom content to nonexistent page

I am trying to add content to what would otherwise be a 404 page. For example I want to define post content for mysite.com/existing-page/imaginary-page instead of showing the 404 page. I've tried ...
0
votes
1answer
54 views

Add code to template dynamically

I'm working on something these days I do not know if it's good practise. My plugin has to take some templates and put them into theme instead of existing header.php and footer.php. EDIT2 : Not a good ...
0
votes
1answer
21 views

How can recognize post's category?

I want my plugin to recognize post's categories before post is loaded. i wrote this code but it works in category page not in post's page with the category is specified from me. function checkUser() ...
0
votes
1answer
193 views

Category link redirect to custom template page instead of index.php?

I want to make template page for my custom taxonomy. I have custom taxonomy categories listed as navigation links. It's the country list (China, Slovenia, Serbia...). Every of this categories has ...
0
votes
3answers
259 views

make permalink go to a custom single.php file

hope somebody can help me with this because I am struggling for a while. I want to use two single.php on my website, one to display the regular posts and another to display some products that I will ...
0
votes
0answers
160 views

Adding a query var to taxonomy term archive - gets redirected to the other taxonomy archive page

I want to pass another query var in the URL through a form while I'm on a taxonomy archive page. The URL would look like so ...
0
votes
0answers
124 views

WP in subdirectory : redirect loop error due to redirect_canonical

I have a fresh Wordpress install in a subdirectory: /blog/ I visit my Wordpress site like this: http://www.example.com/blog and posts like this: http://www.example.com/blog/category/postname In ...
1
vote
1answer
63 views

Include a file before current template file

I would like to include two files before and after current template. I am using template_redirect to do this, But when I call get_current_template() inside template_redirect it returns nothing. is ...
0
votes
2answers
204 views

!is_admin() condition turns true in admin pages

I need users to redirect to login if not logged and once they are, redirect them to backend if they try to see front end pages. This is my code: add_action( 'template_redirect', function () { ...
0
votes
1answer
258 views

Template redirect template loaded, but the header 404

I've created a template redirect for a given url, ex.: test.com/test Test is page is not exists, i'm just checking the url from query_vars, if its match, i load the template with ...
1
vote
1answer
150 views

Pre-Populate $wp_query settings with custom rewrite rules and custom template_redirect

I'm currently working on a file browser plugin which requires frontend editing capabilities for a registered user. For this scenario, I have registered some custom rewrite rules for my custom post ...
0
votes
2answers
115 views

How should I approach changing the template & $query as part of a shortcode's execution?

I am working on a project where I need to be able to change the template being used if a given shortcode is used. To complicate things more, the plugin must also be able to rewrite $query if this same ...
0
votes
1answer
100 views

Custom template redirect based on url vars

I am using a custom URL on my menu to show the most viewed posts by passing the variables to the url as http://website.com/?v_sortby=views&v_orderby=desc However I want to use a custom template ...
1
vote
2answers
569 views

wp_head() not including styles and javascripts after a template redirect

I am using the template_redirect action to redirect a user to a custom template which has no header, sidebar or footer (the intent is for it to be in an iframe as a dialog box). After I done the ...
-1
votes
3answers
381 views

Proper method to restrict non logged users into certain pages

I was wondering which is the correct method to do this and which action hook should i use. I have custom login/register pages so if the user try to go to a forbidden page and its not logged in i ...
1
vote
1answer
2k views

template_include (overriding default plugin templates via current theme)

This is an extension of this question/answer. A comment on that question references that template_include is preferred to template_redirect when loading templates from a plug-in. However, hanging ...
0
votes
1answer
252 views

Default taxonomy template in plugin, override in theme

Building off of this question/answer, I've sucessfully implemented the single view for my custom post types, but I'd also like to offer the same thing for taxonomies. I've looked through the docs and ...
3
votes
1answer
480 views

Want to redirect if search query match exact title of any post

I am using WordPress 3.3.1 and new to this system. I want to redirect the search query to the post if query exactly matches post title of some post. I also want it to run before any search query ...
0
votes
1answer
185 views

What hooks, actions or filters i can use to customize wordpress registration page and form?

i would like to customize the design of the registration page of wordpress and also the registration form. Can i create a registration page template? or maybe tell wordpress to use a custom ...
6
votes
1answer
3k views

Custom Post Types and template_redirect

I have two custom post types (e.g. post_type_1 and post_type_2) that I would like to redirect to independent templates (single-post_type_1.php and single-post_type_2.php) to handle their display. I ...
11
votes
4answers
4k views

single-{$post_type}-{slug}.php for custom post types

My favorite part of the Wordpress template hierarchy is the ability to quickly create template files for pages by slug, without having to edit the page in Wordpress to select a template. We can ...
4
votes
3answers
488 views

Wordpress multisite,several different languages,page redirect?

I have something like this http://example.com/en , http://example.com/fr and http://example.com/es for example I would like if I'm on this page http://example.com/en/about-us/ when I click on other ...
1
vote
2answers
484 views

Are Category or Tag Archive Pages Possible?

Currently /category and /tag 404 if you hit them directly. Is it possible to create a theme template to handle what would display on it? Mark Jaquith - ...
1
vote
2answers
272 views

Common single page template options

I am developing a common theme for 25 websites, the default requirements are done. Each site has got different single post template. I need to group it as a single theme so i don't need to hard-code ...
10
votes
1answer
9k 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, ...
0
votes
1answer
1k views

Change template dynamically

Is it possible to change the template loaded for a page, as it loads, without having to change the record in the database? I suspect it can be done with the template_redirect action, and the will ...
1
vote
1answer
273 views

Different Template based on HTTP Referer

He Guys, i've been looking for a way to show a different Page-Template based on HTTP Referer or maybe the User Agent or what ever. I'm planning an Image-Gallery which should be shown in a Fancybox. ...
1
vote
4answers
679 views

Where does the 404 redirection happen?

Can someone please tell me where the 404 redirection occurs? I am wanting to redirect to a custom template.php instead of the 404 page. Is this possible to do? If it is can some one provide me with ...