How to create a specific frontend URL (not a Page) from a theme or plugin?
Read AJAX in Plugins. Themes work the same way. So, you get an API, some gotchas inclusive. 🙂 Our tag ajax is quite popular too; you may find some good solutions there.
Read AJAX in Plugins. Themes work the same way. So, you get an API, some gotchas inclusive. 🙂 Our tag ajax is quite popular too; you may find some good solutions there.
You are doing everything right, double check the below code and make sure to go to Permalinks in your dashboard to flush the rewrite rules. From WordPress Codex: Note: Visiting the Permalinks screen triggers a flush of rewrite rules. There is no need to save just to flush the rewrite rules. It will work, I … Read more
Currently I can’t offer a full answer to your question, but here as a starting point a (PHP 5.3+/closure) plugin that dumps the global WP_Rewrite object into the shutdown hook. <?php /* Plugin Name: Show WP_Rewrite Dump at the last hook (shutdown) */ add_action( ‘shutdown’, function() { var_dump( $GLOBALS[‘wp_rewrite’] ); } ); This doesn’t take … Read more
From doing some research, I’d recommend trying out this plugin: Redirection. This plugin allows you to manage 301 redirections. I played around with the settings and they allows regular expressions which could do the following: http://some.site/hashtag?tag=some-tag/ to http://some.site/tags/some-tag/ They provide documentation on how to set it up which can be found here. This is what … Read more
you can use this plugin to generate this kind of permalink https://wordpress.org/plugins/wp-category-permalink/
Changing the permalink structure is definitely a big deal for an existing site. In order to test the various ways in which changing the permalink structure could break the site, I definitely recommend setting up a test environment. So, my question is, is it ok to leave the internal links “ugly?” I’m not sure from … Read more
I’m not positive I understand the question, but if you’re just trying to get the site URL, you can use the get_site_url() WP function. So, like this: $siteURL = get_site_url(); header(“=Location: $siteURL” . “/myoriginalformpage/?success=”, $success); And you can change the parameters of get_site_url() to specify the path and to display ‘https’ or ‘http’. But if … Read more
http://codex.wordpress.org/Function_Reference/get_author_posts_url
You can do this with a rewrite rule from within WordPress. Take a look at the documentation for add_rewrite_rule. Something like this: <?php add_action(‘init’, ‘wpse65855_rewrite’); function wpse65855_rewrite() { add_rewrite_rule( ‘^photos/?$’, // the rule regex ‘index.php?taxonomy=category&term=photos’, // where you want the rule to go ‘top’ // the priority. Make this one go first ); } You … Read more
Actually WordPress lacks a real function to get posts by slug/post-name. But you can use get_page_by_path() for it so you don’t have to use a custom query: if(function_exists(‘icl_object_id’)) { $post = get_page_by_path(‘your-slug’); $id = icl_object_id($post->ID,’post’,true); $link = get_permalink($id); } The only difference here is that you must use the full path i.e. (‘parent-page/sub-page’) if you … Read more