New answers tagged

0

Turns out what I tried before actually worked but my browser forced the site to https from old habits (cache). If anyone else is having problems with this, here is what I did: Make sure the URL does not have s in it in your Sites page in Multisite Dashboard Make sure you don't have a plugin installed forcing HTTPS on (I had iThemes Security so I had to ...


0

Thanks @Tom J Nowell for suggesting I post this fix as an answer! So the answer I found was that Yoast, a custom permalink plugin, and permalinks category bases were conflicting with each other on my site. Here's what I did to fix it: Make sure your category base is specified in Permalinks. Save them. Remove any custom permalink slugs in the category terms. ...


0

There are lots of solutions to redirect from the old post URL to the new post URL. You can install a plugin "Safe Redirect Manager" and set it from the admin panel. You can write some snippet in the functions.php file as: add_action('template_redirect', 'post_redirect_by_custom_filters'); function post_redirect_by_custom_filters() { global $...


0

You can easily do it with wp cli. Install wp-cli using the instruction here run wp plugin deactivate really-simple-ssl from terminal. You can also add autocomplete to your bash terminal so you can easily see suggestion of plugins you have installed.


1

The basic principles of this are easy enough, but how to implement it in your case is hard to say without knowing more. if ( !is_user_logged_in() ) { auth_redirect(); } Would redirect a non-logged in user to the login page if (current_user_can('administrator')) Would be used to identify whether someone had the admin role. How to implement this is ...


1

If you want to keep your current structure I would use a routing library. With this library you could solve your issue like this: Routes::map(':job_slug/apply', function($url_params) { $params = []; $wp_query_args = [ 'post_type' => 'page', 'posts_per_page' => 1, 'post_name__in' => ['apply'] ]; Routes::load('...


1

You can assign the 404.php as a template to your custom 404 page created with the page builder. You would need to edit the 404.php to something like this: <?php /** * Template Name: 404 */ get_header(); $query = new WP_Query([ 'posts_per_page' => 1, 'post_type' => 'page', 'meta_key' => '_wp_page_template', 'meta_value' => ...


1

I assume you have a custom taxonomy for your CPT, so your CPT should be 'job' and your custom taxonomy can then be 'jobs' and then you'd have custom terms within that taxonomy for each job type. The Posts then would consist of the individual job with any associated relevant data (rate of pay, hours, etc). If that is your setup - and how I would do it - then ...


0

For anyone who this might help, I found a working solution. Redirecting is working and users can see their images at the front-end WP Media Uploader. function my_noAdminAccess(){ if ( is_admin() && ! current_user_can( 'delete_others_posts' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ){ if( wp_get_referer() ){ ...


1

In case someone looking for answers in the future, I have solved the issue by searching for add_filter('redirect_canonical' in all the plugins and found the culprit.


1

From what I see, you just need to change the if in your redirect_user() function to: // List of Page slugs of the particular pages in question. $pages = array( 'page-slug', 'another-slug', 'etc-etc' ); // .. or specify a list of Page IDs: array( 1, 2, 3, ... ) // Redirect only if the current Page's slug (or ID) is within the above list. if ( ! ...


Top 50 recent answers are included