get variable from url?
You are looking for get_query_var() function: $orderby = get_query_var(‘orderby’);
You are looking for get_query_var() function: $orderby = get_query_var(‘orderby’);
You could add a rewrite rule. Rewrite rules are the regular expressions that WP uses to parse out the query from friendly URLs. But I think this would potentially mess things up. How would WP distinguish between /this-is-a-page/this-is-a-child-page/ and /this-is-a-page/this-is-a-parameter/? A better option, I think, would be to hook into the parse_request action. This gets … Read more
Check out the Codex, specifically step 2. What you need to do is create a new page, name it “Blog”. Make sure the permalink is http://xxxx.com/blog. Then, in Settings > Reading, select that page as your posts page.
I’m assuming that you’re working with one of the latest versions, but I used the latest 1.5.1. Without knowing how your specific Facebook Connect plugin works and why it breaks here’s what I’ve come up with. Short answer // bp-members/bp-members-signup.php ~ line 611 if ( defined( ‘BP_SKIP_REGISTRATION_REDIRECT’ ) and BP_SKIP_REGISTRATION_REDIRECT ) wp_redirect( ‘/?pagename=register’ ); And … Read more
index.php acts as a router. All requests are sent through index.php which looks up the rules in the database and directs you to the correct location. This should give you an idea of how a PHP router works. The .htaccess just removes index.php from the URL. More rules can be created using the WP_Rewrite class.
The easiest explanation I can think of is that you have a file or directory in your site’s directory named “pitch” (such as public_html/pitch or public_html/my-domain/pitch). This can easily be caused by creating the folder for some reason and forgetting about it later or setting up a subdomain such as pitch.my-domain.com which typically will create … Read more
Basically, what you are looking at in the theme you mentioned is just a dummy link with # That’s why it just takes you to the start of the page. If you check the href attribute of the link for SEO Optimization it has # in the end. http://www.gallyapp.com/tf_themes/chamber_wp/?page_id=11# My suggestion is that you need … Read more
Use flush_rewrite_rules(): add_action( ‘init’, ‘my_rewrite_func’ ); function my_rewrite_func() { add_rewrite_rule( ‘post4/$’, ‘index.php?p=12’, ‘top’ ); flush_rewrite_rules(); } and / or whichever rewrite rules you use, you could always use /? for optional trailing slashes or force the trailing slash if you would prefer for it to always be there.
This is possible, but, the effort required is not trivial, and it is not performant, I would advise against doing it. Your regions taxonomy will have a rewrite rule similar to this: regions/(.+?)/?$ -> region: (.+?) What you’re wanting is something similar to this: (.+?)/?$ -> region(.+?) The problem here is that this rule doesn’t … Read more
i fixed it using the apache proxy module: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} !location RewriteRule ^(boston|newyork)/$ /index.php?location=$1 [NC,QSA,P] RewriteCond %{QUERY_STRING} !location RewriteRule ^(boston|newyork)/(.*)$ /$2?location=$1 [NC,QSA,P] RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> the [P] option does the trick.