0
votes
0answers
28 views

How can I send an id over the url?

I need to send an id that I am going to collect and use in a plugin. Plugin will collect it in a page where I use plugins shortcode. The url I am trying to get is like ...
0
votes
1answer
26 views

Forward an old url rewrite scheme to a new one?

I have the following url rewrite for custom post type: add_rewrite_rule( 'event/([0-9]+)', 'index.php?post_type=event&p=$matches[1]', 'top' ); Due to a site structure change, I'll ...
0
votes
1answer
62 views

Apache rewrite rules and wordpress problem

I tried to fix my problem by using wordpress rewrite rules but sadly it took me so long I tried this approach. I got it working for one of my simpler problems but now I can't get it to work for my two ...
1
vote
2answers
142 views

Filter to change the content of 404 page

I have created custom rewrite rules. These rules now go to 404 page as expected. I can use action hook template_redirect to change the template matching query_var. But I don't want to create separate ...
0
votes
1answer
53 views

Custom slug in url for CPT and taxonomy

I want to add a custom slug to permalink for CPT and taxonomy. Like this: http://mydomain.com/my-custom-slug/post-slug http://mydomain.com/my-custom-slug/product_category Here is my CPT and ...
1
vote
0answers
98 views

Help writing custom function with rewrite endpoint that generates a page from dynamic content

I'm creating a WordPress plugin that will pull content from an API and display it dynamically on a WordPress blog like it's native content. An example of this content would be company locations. I ...
0
votes
0answers
353 views

add_rewrite_rule not working

I'm trying to do some url rewriting. I've picked this example right off the wordpress wiki here: add_rewrite_rule('^nutrition/([^/]*)/([^/]*)/?','index.php?foo=bar','top'); The wiki page says: ...
0
votes
0answers
53 views

Use of unicode postname when using custom generate_rewrite_rules

I have a custom rewrite rules like.. add_action('generate_rewrite_rules', function ($wp_rewrite) { $wp_rewrite->rules = array('products/(.+?)$' => ...
2
votes
2answers
189 views

flush_rewrite_rules() not working on plugin activation

I am experimenting with creating a simple plugin to create a custom post type named project but am having some trouble with the rewrite rules not been flushed on activation. I have the main plugin ...
1
vote
1answer
227 views

Why doesn't flush_rewrite_rules run on plugin activation?

I'm trying to flush rewrite rules in a plugin and it isn't working. I have to go to permalinks -> save in the admin panel for the rewrites to flush. Can anyone see why? class SpektrixPlugin { public ...
0
votes
0answers
67 views

Use custom clean URLs for a plug in

I've created a plug in that displays a list of items from the database. I need to link from an item to the item description page, however instead of the link looking like: ...
1
vote
2answers
184 views

URL rewriting must be activated manually for my plugin

I am creating a Wordpress plugin which create pages (with get_header(), get_footer() and get_sidebar()) for searching through an API. Of course, I have defined some rules for URL rewriting like this: ...
0
votes
2answers
77 views

How to embed a new string in url?

I am creating a custom tours and travel theme in which I have created custom post type Cities, Locations, Destinations and i am using custom permalink structure. /%category%/%postname%/ So now I want ...
2
votes
1answer
2k views

Creating a custom public user page

I'd like to develop a plugin that allows me to have custom user pages. I really like the way the author archive template handles the URL: /author/username. I don't want to rewrite the author_base as ...
3
votes
1answer
634 views

Add rewrite rule in plugin: with .htaccess in plugin folder or using WordPress functions

I need add a rewrite rule in my plugin, and distribute it with my code. All works fine if I put the rule in the .htaccess in the WordPress root folder, but I need distribute the plugin with my rule. ...
0
votes
1answer
127 views

Virtual Page with Registration form

Working on a plugin, which is intended to provide a registration on front-end, to let users register. I am trying to create a Virtual page, which would display the form. Trying to create URL like ...
1
vote
0answers
66 views

Possible to get all posts with my shortcode?

So here's what I'm trying to do. I'm building a plugin for a business directory. Each business is assigned to a category. There are two views, listing and detail. To give the user as much ...
0
votes
2answers
207 views

Rewriting Image URLs from dynamic to original

Here's the deal: My plugin automatically watermarks images from the WP gallery on the fly using the GD library wherever these images appear. So, I have a physical copy (in wp-uploads) of these ...
1
vote
1answer
2k views

How to Rewrite Wordpress URL for a Plugin

I am trying to build a Wordpress plugin here with a custom user admin area. What I would like to do is when the user adds /edit at the end of the page, it should open a page from my plugin. So for ...
1
vote
1answer
128 views

add_rewrite_rule behaving strangely

I'm customizing another plugin by changing the rewrite rule, from: add_rewrite_rule('^api/auth/([0-9]+)?/?','index.php?__api=1&uid=$matches[1]','top'); to: ...
3
votes
1answer
170 views

Removing rules from .htaccess

I'm writing a small plugin that needs to write to .htaccess a simple non_wp_rule and i am doing it like this: function ci_flush_rules() { global $wp_rewrite; $wp_rewrite->flush_rules(); } ...
0
votes
1answer
136 views

How to use permalink query to go to specific tabs in posts

I'm not really sure how to phrase the questions, but hope it's not too confusing. Basically I've create a plugin which inject custom tabs into the posts content when displaying. For now, just assume ...
1
vote
1answer
240 views

How To Consistently Enforce Rewrite Rule in Plugin Development

Let's say I create a customer support plugin that hijacks the /support part of the URL and redirects it to an MVC framework in my app folder of my plugin folder, like so: RewriteRule ^support(.*)$ ...
0
votes
0answers
243 views

Wordpress Plugin function callback by URL [duplicate]

Possible Duplicate: How to Rewrite Wordpress URL for a Plugin I'm creating a plugin for Wordpress. Is there any way or API to make plugin receive a path or URL so that it can trigger or ...
1
vote
2answers
943 views

How to Create a Custom Plugin Permalink

I wrote a simple plugin that will redirect the users to a page on a certain date. (in this case it's for the Blackout against SOPA here in the US) Right now I'm using the line ...
1
vote
1answer
301 views

How can I rewrite a URL to pass requests to a custom method via AJAX? (I can't use admin-ajax.php)

I have to build a WordPress plugin which gives out HTML for an AJAX call. However, because of the server environment I cannot use the traditional admin-ajax.php. Someone told me that I could build a ...
0
votes
3answers
5k views

Mapping multiple URLs to same page

I just came across this page with almost similar requirements as mine Multiple endpoints to same page i have to achieve same functionality but i also want to pass some parameters to the page where ...
0
votes
1answer
539 views

HowTo to add my rewrite rules at the beginning, redirect to the right page and flush the rules on plugin activation?

Hi i am currently writing a WordPress plugin that i want to release to the public. I am having a few issues with URL rewrites however. I have got the plugin to redirect to the plugin page ...
3
votes
2answers
237 views

What is the best way to output plugin result in certain url

Knowing that wordpress doesn't follow MVC pattern. What is the best way in worpress to output plugin's result in a certain url. lets say I would like to show "hello world" in main area under ...
0
votes
1answer
295 views

restricting custom rewrite to just one custom post type

I am using the following code to create a short permalink for one of my custom post types. I have another cpt that I wish to just use the default permalink structure, so what would be the best way to ...
0
votes
1answer
508 views

Custom Path for a Plugin

i developed a plugin (the backend at least) and now i want to add a frontpage to my blog. the url should look something like this http://www.mywordpressblogalsoroot.com/mypluginname/param1/param2 ...
1
vote
1answer
744 views

Custom rewrite rule serves content, but returns 404 error code

I have a plugin that sets up a custom rewrite rule. I can access the short URL and the content is returned correctly, but the HTTP response is 404, Page not found. From searching the web it seems ...
3
votes
2answers
3k views

Making a plugin file accessible via url rewrite?

In my WordPress plugin I have a php file that generates some stats about the blog and outputs it as a simple text file. To access WordPress functions I've included this at the top of the file: ...
26
votes
1answer
7k views

A tool to analyze rewrite rules? [closed]

Is there a good tool to analyze my rewrite rules? I always get confused with the regexes and the parameter replacements. I have created something myself and will post it here so others can use it, ...