Question
I am trying to Re-Write Page URL's so that they END with .htm I was able to do this using... /* Add .htm extension to Page URL Links */ add_action('init', 'htm_page_permalink', -1); function htm_page_permalink() { global $wp_rewrite; if ...

Question
I know this is a fairly common topic around here, but I can't seem to figure out a solution to my particular case from reading similar threads. Basically, my permalink structure needs to be /%postname%/ for compatibility with a finicky plugin. ...

Question
I'm trying to use custom links in the php code to link to buddypress profile pages. Basically, I need a way to create a username constant so I can make links like domain.com/members/--username--/profile domain.com/members/--username--/settings domain.com/members/--username--/other with --username-- being the constant which changes the ...

Question
I was trying to use a custom URL to load a page template for single-events.php without rewriting the default URL format. I am using filter "template_include" to load the template like this: add_filter('template_include','include_template_for_single_event',99); function include_template_for_single_event($template) { //check_for_single_event() will check if ...

Question
I need to create a Elementor page which should have the following URL structure: /order/(.*?)-([0-9]+)?$ At this page I should display a Elementor widget which will display information about order with given orderId. Whay I reied to do is to create a custom ...

Question
I've seen a few questions that are very similar, but I haven't been able to get an exact answer, so I'm going to explain my situation here. Quite simply, I need the following url structure: site.com/dining (custom post type) site.com/dining/restaurants (terms of custom ...

Question
I wrote the add_rewrite_rule to get some parameters in query string. the following rules are added in functions file. add_rewrite_rule( '^en(.*)/(.*)/(.*)/?$', 'index.php?post_type=client&name=$matches[1]&parent=$matches[2]&sub1=$matches[3]', 'top' ); add_rewrite_rule( '^(.*)/(.*)/(.*)/?$', 'index.php?post_type=client&name=$matches[1]&parent=$matches[2]&sub1=$matches[3]', ...