How to assign a Permalink to a Function

Create an endpoint. That is a custom URL that will be handled by a callback. Examples are How can I use WordPress functions in my stylesheet? and Is it possible to request several post types from a feed?. See also add_rewrite_endpoint() and A (Mostly) Complete Guide to the WordPress Rewrite API.

Must permalinks always point to single post pages?

There are two hooks named ‘pre_post_link’ and ‘post_link’. Their first argument – which you can change – is the permalink. So … add_filter( ‘pre_post_link’, ‘wpse_42406_change_permalink’, 10, 2 ); function wpse_42406_change_permalink( $permalink, $post ) { // change the permalink, let it point to an archive etc. return $permalink; } … will change the output. In your … Read more

WordPress 403 issue when passing parameters in the URL

This error is generated by the Cerber Security Plugin. You can add an exception on ‘Antispam’ under the WP Cerber menu, ‘Adjust Antispam engine’, ‘Query whitelist’. You probably want {\/contact-us\?enquiry_type=\d+} for a regular expression to match any numeric enquiry_type value. The relevant documentation is here: Configuring exceptions for the antispam engine.

htaccess or redirect to cloak portion of a link?

What you need to do is set up a custom rewrite. This can change something like http://site.com/rotate/1 to http://site.com/wp-content/plugins/ad-rotating-plugin/rotate.php?trackerid=1 Here is some untested code that might help: <?php /* Plugin Name: Your Plugin Plugin URI: Description: Version: 0.1 Author: Author URI: */ // Add rewrite rule and flush on plugin activation register_activation_hook( __FILE__, ‘ad_rotate_activate’ ); … Read more

Add %taxonomy% in custom permalink structure

There’s an array option when creating a custom post type and custom taxonomy for “”rewrite”” and you can set a “”slug”” and it’s there that you can change your permalink structure. For more read here. Also the other option that I get from post 1 and post 2 one helped me blink some idea. 1 … Read more