Wordpress URL-Rewrite with custom tax & custom param & pagination supportWordpress custom taxonomy pagination not workingwordpress url rewrite rules producing 404 errorhtaccess mod rewrite rule appending url paramsWordpress Custom template - frontpage pagination not workingURL rewrite regex conversionURL rewrite not working in htaccess.htaccess rewrite url with two variablesWordpress shortcode function - pagination on taxonomy templateWordpress rewrite not getting picked upWordPress Rewrite URL using rewrite rule in function file.
Unsolved Problems due to Lack of Computational Power
Is a USB 3.0 device possible with a four contact USB 2.0 connector?
Have there ever been other TV shows or Films that told a similiar story to the new 90210 show?
Meaning and structure of headline "Hair it is: A List of ..."
Is this bar slide trick shown on Cheers real or a visual effect?
global variant of csname…endcsname
How do I answer an interview question about how to handle a hard deadline I won't be able to meet?
Short Story: Cold War setting. In orbit, two astronauts decide whether to launch nuclear counter strike ("MAD" scenario). Twist at end
Alignement of different align environment
Why does this image of cyclocarbon look like a nonagon?
Why don't modern jet engines use forced exhaust mixing?
Why can't I see 1861 / 1871 census entries on Freecen website when I can see them on Ancestry website?
What does 〇〇〇〇 mean when combined with おじさん?
What are some tips and tricks for finding the cheapest flight when luggage and other fees are not revealed until far into the booking process?
Can anybody tell me who this Pokemon is?
Why should P.I be willing to write strong LOR even if that means losing a undergraduate from his/her lab?
Why is the battery jumpered to a resistor in this schematic?
Combinatorial Argument for Exponential and Logarithmic Function Being Inverse
μονάδαι as plural form of μονάς
How do I ask for 2-3 days per week remote work in a job interview?
Why does "auf der Strecke bleiben" mean "to fall by the wayside"?
What's a good pattern to calculate a variable only when it is used the first time?
Is Fourier series a sampled version of Fourier transform?
How to train a replacement without them knowing?
Wordpress URL-Rewrite with custom tax & custom param & pagination support
Wordpress custom taxonomy pagination not workingwordpress url rewrite rules producing 404 errorhtaccess mod rewrite rule appending url paramsWordpress Custom template - frontpage pagination not workingURL rewrite regex conversionURL rewrite not working in htaccess.htaccess rewrite url with two variablesWordpress shortcode function - pagination on taxonomy templateWordpress rewrite not getting picked upWordPress Rewrite URL using rewrite rule in function file.
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
so three tasks and I finished with first two, but there is a pagination problems
My url looks like
/some_product_cat/some1/
so I using
add_rewrite_rule("([^/]*)/($rule)$", 'index.php?post_type=product&'.$attr.'=$matches[2]&taxonomy=product_cat&product_cat=$matches[1]', 'top');
where rule is (some1|some2) and its working, but there is a problem with using page/1, when it look like
/some_product_cat/some1/page/2
so i tried
add_rewrite_rule("([^/]*)/($rule)/(page/?([0-9]1,)/?)?$", 'index.php?post_type=product&'.$attr.'=$matches[2]&taxonomy=product_cat&paged=$matches[4]&product_cat=$matches[1]', 'top');
which work perfect with preg_match testing, but breaks some_product_cat/(some1|some2) page and return 404 on ([^/]*)/($rule)/page/111
what I am doing wrong?
thanks
regex wordpress mod-rewrite url-rewriting preg-match
add a comment |
so three tasks and I finished with first two, but there is a pagination problems
My url looks like
/some_product_cat/some1/
so I using
add_rewrite_rule("([^/]*)/($rule)$", 'index.php?post_type=product&'.$attr.'=$matches[2]&taxonomy=product_cat&product_cat=$matches[1]', 'top');
where rule is (some1|some2) and its working, but there is a problem with using page/1, when it look like
/some_product_cat/some1/page/2
so i tried
add_rewrite_rule("([^/]*)/($rule)/(page/?([0-9]1,)/?)?$", 'index.php?post_type=product&'.$attr.'=$matches[2]&taxonomy=product_cat&paged=$matches[4]&product_cat=$matches[1]', 'top');
which work perfect with preg_match testing, but breaks some_product_cat/(some1|some2) page and return 404 on ([^/]*)/($rule)/page/111
what I am doing wrong?
thanks
regex wordpress mod-rewrite url-rewriting preg-match
add a comment |
so three tasks and I finished with first two, but there is a pagination problems
My url looks like
/some_product_cat/some1/
so I using
add_rewrite_rule("([^/]*)/($rule)$", 'index.php?post_type=product&'.$attr.'=$matches[2]&taxonomy=product_cat&product_cat=$matches[1]', 'top');
where rule is (some1|some2) and its working, but there is a problem with using page/1, when it look like
/some_product_cat/some1/page/2
so i tried
add_rewrite_rule("([^/]*)/($rule)/(page/?([0-9]1,)/?)?$", 'index.php?post_type=product&'.$attr.'=$matches[2]&taxonomy=product_cat&paged=$matches[4]&product_cat=$matches[1]', 'top');
which work perfect with preg_match testing, but breaks some_product_cat/(some1|some2) page and return 404 on ([^/]*)/($rule)/page/111
what I am doing wrong?
thanks
regex wordpress mod-rewrite url-rewriting preg-match
so three tasks and I finished with first two, but there is a pagination problems
My url looks like
/some_product_cat/some1/
so I using
add_rewrite_rule("([^/]*)/($rule)$", 'index.php?post_type=product&'.$attr.'=$matches[2]&taxonomy=product_cat&product_cat=$matches[1]', 'top');
where rule is (some1|some2) and its working, but there is a problem with using page/1, when it look like
/some_product_cat/some1/page/2
so i tried
add_rewrite_rule("([^/]*)/($rule)/(page/?([0-9]1,)/?)?$", 'index.php?post_type=product&'.$attr.'=$matches[2]&taxonomy=product_cat&paged=$matches[4]&product_cat=$matches[1]', 'top');
which work perfect with preg_match testing, but breaks some_product_cat/(some1|some2) page and return 404 on ([^/]*)/($rule)/page/111
what I am doing wrong?
thanks
regex wordpress mod-rewrite url-rewriting preg-match
regex wordpress mod-rewrite url-rewriting preg-match
asked Mar 27 at 12:53
Az RieilAz Rieil
215 bronze badges
215 bronze badges
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377713%2fwordpress-url-rewrite-with-custom-tax-custom-param-pagination-support%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377713%2fwordpress-url-rewrite-with-custom-tax-custom-param-pagination-support%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown