Title: get_permalink
Last modified: August 30, 2016

---

# get_permalink

 *  Resolved [Isolary](https://wordpress.org/support/users/isolary/)
 * (@isolary)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/get_permalink-1/)
 * I’m creating a widget that uses Eventbrite_Query to list upcoming events, but
   the function the_permalink, when called by this query, is returning URLs based
   on the current page (thus causing 404 errors).
 * For example, if the widget is in the sidebar of a page at: `http://mysite.com/
   about/` (or any page that doesn’t use the “Events” template provided by the plugin),
   then the permalinks for events look like: `http://mysite.com/about/my-event-123456789`
 * Is there a good way to set permalinks for events to a specific “Events” page,
   or do I just need to build that setting into my widget plugin (I’m not an experienced
   plugin developer)?
 * [https://wordpress.org/plugins/eventbrite-api/](https://wordpress.org/plugins/eventbrite-api/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Automattic](https://wordpress.org/support/users/automattic/)
 * (@automattic)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/get_permalink-1/#post-6780331)
 * Yes, correct, the plugin filters the permalink to match up with the page template.
 * In your situation, you’ll want to do the same: use the `post_link` filter to 
   [modify the permalink](https://github.com/Automattic/eventbrite-api/blob/master/inc/class-eventbrite-query.php#L371)
   to whatever you need. You’ll want to either [unhook the plugin’s filter](https://github.com/Automattic/eventbrite-api/blob/master/inc/class-eventbrite-query.php#L30),
   or add your filter on a [later priority](https://codex.wordpress.org/Plugin_API#Hook_to_WordPress)
   so that it’s the one that takes effect.

Viewing 1 replies (of 1 total)

The topic ‘get_permalink’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/eventbrite-api_94776b.svg)
 * [Eventbrite API](https://wordpress.org/plugins/eventbrite-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eventbrite-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eventbrite-api/)
 * [Active Topics](https://wordpress.org/support/plugin/eventbrite-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eventbrite-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eventbrite-api/reviews/)

## Tags

 * [permalink](https://wordpress.org/support/topic-tag/permalink/)

 * 1 reply
 * 2 participants
 * Last reply from: [Automattic](https://wordpress.org/support/users/automattic/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/get_permalink-1/#post-6780331)
 * Status: resolved