Custom additions to permalinks for any kind of type (archives, posts, root).

learn more… | top users | synonyms

1
vote
0answers
20 views

register_rest_field for custom taxonomy fields that are assosiated with custom post type

I am trying to register a rest field for my custom taxonomy's custom meta fields. I followed the tutorial at Modifying Responses . The code worked great for adding a rest field for post meta data for ...
0
votes
0answers
14 views

change template by permalink endpoint via plugin

I'm trying to change template using this code: add_filter( 'query_vars', 'add_query_vars'); function add_query_vars($vars){ $vars[] = "photos"; return $vars; } function ...
0
votes
0answers
59 views

WP add_rewrite_endpoint - custom post types destroys permalink URL match

I'm trying to implement AMP-versions to Wordpress posts with a custom plugin. The problem I'm having is that we use a bunch of different post types. They all have their own permalink structure. For ...
1
vote
1answer
46 views

Multiple endpoints in one URL

I am trying to add multiple endpoints in one url like: http://localhost:1000/manage-lead/lead_id/1000/product_id/123455 But this way the query var lead_id is equal to 1000/product/123455 and not ...
1
vote
1answer
77 views

My php header() function is not working [closed]

// Edit: I figured it out. Hours and hours of banging my head against a wall and it turns out all this needed was one simple line: ob_clean(); Somewhere in some included file there's probably one ...
0
votes
1answer
37 views

variable endpoints for webservice

New to wordpress development, I am working on a plugin that retrieves data from a webservice. I need an endpoint because the retrieved data also depends on the value of the page's metabox, so in ...
0
votes
1answer
33 views

Rewrite Endpoint Url without ? before endpoint

Created Custom Post type called members, don't need a members permalink, but need to link to member patents, if exists for member (which I got figured out). The problem I'm facing is the creation of ...
0
votes
1answer
45 views

How to use a RewriteRule to change endpoint url

I'm using woocommerce and wordpress. I would like to know how to use a RewriteRule to change my url from: /my-account/edit-address/billing to /account/edit-address/billing and load the endpoint page ...
1
vote
1answer
41 views

Does it still make sense using json endpoint ep_mask now that there's the new rest api? [closed]

I was wondering... Maybe I don't get the point here, don't know. I think that the rewrite api is still usefull for creating beautiful frontend urls for regular users. But I'm not sure on adding a json ...
0
votes
0answers
76 views

WP-API custom post types request by slug

How to get post by slug in wp-api for custom types, I've been extending the api and I can fetch all posts of my custom type but I would like to get the items by slug. I see in documentation that I ...
1
vote
1answer
44 views

Enpoint Not Found in Rewrite Tag Permalink

I'm trying to make an XML feed show nice and pretty permalinks rather than showing query strings. The problem is I can't get my /products/ endpoint to show up when trying to process my custom rewrite ...
0
votes
0answers
46 views

add_order_item from custom endpoint

Im useing WP>Woocommerce->Woocommerce subscriptions I have created a custom endpoint: /edit-subscription/. You can see exactly what i did in the last comment here: https://github.com/woothemes/...
2
votes
1answer
102 views

Request object for validate_callback

I'm trying to define a new REST Api endpoint based on WP REST API (version 2) and have question relating to what arguments are available to the validate_callback and sanitize_callback. Is the Request ...
2
votes
1answer
137 views

Custom Endpoint Gives 404 Header

I'm trying to write a general endpoint that loads a template. It works as expected with the small exception that the returned header is 404 - Page not Found. Am I missing something in my rewrites? ...
3
votes
1answer
376 views

Sync posts from one WordPress site to another

I want to achieve the following - I have 2 WordPress sites hosted on different servers. Let's call A as sender site and B as receiver site. Whenever I add/update/delete any post in A, it should be ...
1
vote
0answers
76 views

Endpoint on Specific Page Slug

I have created an endpoint inside of my plugin: add_rewrite_endpoint( 'libstaff', EP_PAGES ); Now I would like to have the endpoint work for one page only based on its slug. In this case, I want it ...
0
votes
1answer
64 views

Endpoint Callback Display for Custom Plugin

I am building a plugin which allows admins to add staff members to a database. I have created a function in my plugin class file... cp_libstaff_frontend_display() ...which displays a table of every ...
5
votes
1answer
214 views

Dynamic Endpoints

I have a database table outside WordPress that I need to make endpoints for. I've created a page /cars/ where I plan on using a page template to generate links. I would like for the url to look like /...
1
vote
0answers
104 views

How make a multi language routes, with rewrite rules or rewrite endpoints?

I want to know a concept of making a multi language routing system for WP. That is the best practice, to make this routing system with add_rewrite_rules for pages post arhive etc in part, or to use ...
0
votes
1answer
293 views

Custom Endpoint For Custom Post Type from Child Theme

I'm working with a child theme. Main theme has a custom post type called "Place". I need to change that into "Location". However, I changed all levels using wp_post_types object. Now I need to change ...
1
vote
0answers
19 views

Rewrite Endpoints not Indexing with google

I don't know if anyone else has found this, but I've created some Endpoints for Authors to now have several pages, but Google isn't seeing any of them. It seems to see the parent url, but not any of ...
1
vote
0answers
250 views

add_rewrite_endpoint() and Custom Post Type Archive

I've got a custom post type. Let's call it books. I'm adding a new rewrite endpoint called pages. I want the url /books/pages/2/ to work but I don't see any rewrite rules generated by WordPress for ...
3
votes
2answers
703 views

Make Two Views of Post Type Archive At Two URLs

Updates 6 Feb 14 to make more specific as requested in comments. I have a post type, we'll call it "Projects", with the slug "projects" for which I'd like to offer two views: list view (default) ...
0
votes
0answers
29 views

Endpoints help with permalinks

I'm trying to do the following, and I believe its done with endpoints, but I'm not entirely sure. I have 2 different CPTs. Let's call them "Movies" and "Music." The music is always from movies, but I ...
-1
votes
1answer
196 views

wordpress url rewrite Query Var to Static url

i have urls like these: http://animup.net/manga/bara-no-maria/ and have some url parameters http://animup.net/manga/bara-no-maria/?chp=1 http://animup.net/manga/bara-no-maria/?chp=2 http://animup....
1
vote
0answers
244 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 ...
1
vote
1answer
1k views

Why is add_rewrite_endpoint incompatible with /%category%/%postname%/ permalink structure?

I've added a myvar/myvalue rewrite endpoint to EP_ALL which can be added to any URL of a WP installation and a WP plugin will act upon it. That part is cool but it doesn't work when the permalink ...
3
votes
2answers
1k views

Add rewrite endpoint to author page + pagination

I want to add a new endpoint to the author page, so that the URL looks like this: http://example.com/writer/username/articles So far, I have: Changed the author base Added a rewrite rule Setup ...
14
votes
1answer
2k views

Using the Rewrite API to Construct a RESTful URL

I'm trying to generate rewrite rules for a RESTful API. I just want to see if there is a better way to make this work than having to write out every possible rewrite combination. Ok so I have 4 ...
0
votes
2answers
606 views

How can I use get header from within my plugin?

I'm writing a plugin to do some specific business logic - edit records for authenticated users, etc. Rather than having the overhead of a form processing plugin that uses stuff in template tags. I've ...
2
votes
1answer
5k 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 ...
3
votes
2answers
917 views

Widget with random posts from a blog for external sites

How can I create a customizable widget with random posts from my blog that can be published on another site as js, iframe or div. Is there any Wordpress plugin for that?
16
votes
2answers
4k views

How can I use WordPress functions in my stylesheet?

I have my style.php file looking like this. <?php header('Content-Type: text/css');?> #div{ background:<?php echo get_option('bgcolor');?>; } This does not work, but when I do ...
7
votes
3answers
10k views

Add extra parameters after permalink?

How can I add extra parameters after a permalink, specifically if I'm using a custom post type? For example, let's say http://mysite/album/record-name was the permalink. How can I make http://mysite/...