php - extra custom rewrite with wordpress -


I found a page built in WordPress - this example lets the phone. It will be opened by entering

Then on that page I assigned it to a custom page. In the custom page I have some $ _get functions that rewrite urls for

, but I want to rewrite this URL, but when I try to do this in .htaccess I always get the main custom page

What code can I do for my rewriting of URLs for needs / where I need it to do? Functions.php

  function add_query_vars ($ avaars) {$ aVars [] = "ord"; // represents the product category name as shown in the URL $ aVAR; } // hook add_query_vars work in query_vars add_filter ('query_vars', 'add_query_vars'); Function add_rewrite_rules ($ aRules) {$ aNewRules = array ('spanske-boejninger / ([^ /] +) /? $' = & Gt; index.php? Pagename = spanske-boejninger & amp; ord = $ mail [ 1] '); $ ARules = $ aNewRules + $ aRules; Return $ aRules; } // hook add_rewrite_rules function in rewrite_rules_array add_filter ('rewrite_rules_array', 'add_rewrite_rules');  

Custom_page.php:

  & lt ;? Php / * Template Name: Spans 'Bozinger * / if (isset ($ wp_query-> query_vars [Ord'])) {$ spanskord = urldecode ($ wp_query-> query_vars ['ord']); }? & Gt;  


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -