How To Use htaccess to Rewrite Link Structure for a Page that is Generated Programatcially

You’re looking to remove a post-type slug completely from the url. This is documented in this answer. Remember that after making any changes to post urls, you should resave your permalink structure for the changes to fully take effect. Edit: You can additionally redirect from the old location (with the slug), this way: function na_redirect_slug_requests() … Read more

How to write different events from different functions in my file to a log file in WordPress

If you set the WP_DEBUG* constants in your wp-config.php file: define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, false ); // prevents debugging messages from appearing in the browser …then you should be able to use error_log() in your code, and your debugging messages will be saved in wp-content/debug.log. (You’ll probably have to … Read more

Create survey that redirects to sidebar menu customized to answers

The wordpress plugin archive offers a lot of options for this kind of topic. You should read the explanations and documentation of the plugin. Here are the plugins I would recommend to you; https://wordpress.org/plugins/formidable/ https://wordpress.org/plugins/quiz-master-next/ https://wordpress.org/plugins/wp-polls/ https://wordpress.org/plugins/social-polls-by-opinionstage/ https://wordpress.org/plugins/yop-poll/