ViscoDesign
Forum Replies Created
-
I haven’t been able to fully narrow this down, but it seems to only happen to the ‘Member’ role. WP Administrators and Super Admins do not experience this issue.
Removing the User from the primary Site introduces the same redirect issue there, and obviously adding them back to the primary Site causes the redirect to be fixed. So you would assume that adding them to the Sub-Site would fix the redirect there, but it does not. Even assigning them the Member role does nothing.
So I’m starting to think that this plugin is not fully compatible with a multisite/network installation.
This was my workaround …
1. Network Deactivate the UM plugin
2. Activate the UM plugin only on the primary site
3. Install WP Force Login plugin — do not network activate, but instead only activate on subdomain(s)
4. Add a function to your functions.php to force all logins to use the UM login …// Redirect Login URL function my_login_url( $url ) { $login_page = network_site_url('login/'); $redirect_to = get_permalink(); return add_query_arg( 'redirect_to', $redirect_to, $login_page ); } add_filter( 'login_url', 'my_login_url' );
5. Add an action to your functions.php to bypass the Force Login plugin for Users logged-in via UM accounts …
// Allows all users of the network to view all sites and posts on the network add_action( 'template_redirect', function() { if ( is_user_logged_in() ) { remove_action('template_redirect', 'v_forcelogin'); } },9,1 );
6. Add a function to your functions.php to hide the Admin bar for non-Administrators …
// Hide Admin Bar function hide_admin_bar( $show ) { if ( ! current_user_can( 'administrator' ) ) : return false; endif; return $show; } add_filter( 'show_admin_bar', 'hide_admin_bar' );
This worked for my setup, and allows me to continue using the UM plugin for Registrations, Accounts, Profiles, Directory, etc.
But obviously it may not be 100% useable for you if you have a setup that relies on UM being activated on subsites.
Hope that helps!
Hi @bilzjkhan, did you find any solutions to this?
I am having trouble with the same issue. I’m trying to redirect to the homepage of a sub site in a network after Login. But it keeps forcing the User to their profile page instead. None of the redirect settings work.
The ‘Hide Admin bar’ setting doesn’t work on the sub site either, but does work on the primary site. It’s weird!
And it’s not just after login either, but even if you visit another page and try come back to the homepage, it always redirects to
/user/username
.The plugin is hijacking the WP
home_url
for the sub site.- This reply was modified 6 years, 6 months ago by ViscoDesign.
Forum: Plugins
In reply to: [Optima Express + MarketBoost IDX Plugin] Add CSS IDs to RowsJust adding my two-cents worth… I’d love to see more IDs used in the CSS. Right now the HTML/CSS is a mess, and is frustrating at best to work with.
Also, a lot of the CSS is hard-coded inline in the HTML, which is just a rookie mistake and simply shouldn’t be done.
I understand that you need to be compliant with hundreds of MLS boards, but why don’t you make it easier for us to customize the layouts and let us worry about whether we are compliant or not. You’re support department (which is great by the way!) is already advising people to use Javascript and CSS hacks to do this, so why not just take the extra step to rework your CSS and make it a truly 5-star plugin.
Done.
Hi Gerroald, I haven’t actually gone back in and reactivated the plugin. When I get some time I’ll check it again and post an update here.
Thanks!
JohnNothing concrete yet, but I believe they are still looking into it. I’m sure Gerroald will post an update when ready, but if not I’ll share the final outcome.
Sorry Gerroald, my bad. Will respond to that email now…
For sure, I’ll send you an email now…
Thanks for the explanation Aaron. I’m not sure how it all works, but this is the code I had to remove from the top of the htaccess…
# BEGIN iThemes Security - Do not modify or remove this line # iThemes Security Config Details: 2 # Quick ban IP. Will be updated on next formal rules save. SetEnvIF REMOTE_ADDR "^2001:41d0:2:b960:0:0:0:0$" DenyAccess SetEnvIF X-FORWARDED-FOR "^2001:41d0:2:b960:0:0:0:0$" DenyAccess SetEnvIF X-CLUSTER-CLIENT-IP "^2001:41d0:2:b960:0:0:0:0$" DenyAccess <IfModule mod_authz_core.c> <RequireAll> Require all granted Require not env DenyAccess Require not ip 2001:41d0:2:b960:0:0:0:0 </RequireAll> </IfModule> <IfModule !mod_authz_core.c> Order allow,deny Deny from env=DenyAccess Deny from 2001:41d0:2:b960:0:0:0:0 Allow from all </IfModule> # END iThemes Security - Do not modify or remove this line
Once I removed those lines the site popped up again.
Server is running Apache 2.2.31
Hi Gerroald.
After the upgrade, iTSec started writing its ‘Quick ban’ IP addresses to the .htaccess file in IPv6 format, and because the server didn’t support IPv6, it threw a 500 internal server error. The site just wouldn’t load. I had to remove the plugin and at the moment it is still deactivated as I’m not sure if I want to switch it back on – because I can’t even get to the Admin area once it’s activated.
That’s the message I got from Hostgator support anyway. Perhaps it’s unique to them? Sorry I can’t elaborate any more, servers aren’t my thing. I just code ??
Hope that helps!
JohnJust a heads-up… the update killed one of my sites on Hostgator as they don’t yet support IPv6. Would’ve been nice to have this as an option, and not automatically switched on in a Sync update.
Forum: Plugins
In reply to: [WordPress IDX Real Estate Listings & MLS Search] Canadian MLSIs this still the case, or have you added any more Canadian boards?
Forum: Hacks
In reply to: DFP custom targeting for categoriesOk, I managed to get it working. This code will insert the category slug from an archive page, into a DFP tag…
<?php if (is_category()): ?> <script type='text/javascript'> <?php $cat = get_category( get_query_var( 'cat' ) ); $cat_slug = $cat->slug; ?> googletag.pubads().setTargeting("category", <?php echo '"'.$cat_slug.'"'; ?>); googletag.cmd.push(function() { googletag.display('div-xxxxxx'); }); </script> <?php endif; ?>
But it’s still not pulling in the assigned DFP ad. Oh well, one step closer I guess.
Forum: Hacks
In reply to: DFP custom targeting for categoriesThanks bcworkz, it is outside the loop, on the archive.php page.
I’ve wrapped the code inis_category
, but I’m still trying to figure out how to pass in the ID. It has to be dynamically inserted.Forum: Hacks
In reply to: Page title and thumbnail outside loopThanks acrane, that’s what I needed alright.
But I’m an idiot … I had the code in the wrong place all along. The echo statement was in the href, that’s why the <h2> was empty all this time. Embarrassing ??
Anyway, for anyone else looking for the same thing, here’s the final code that displays an array of page thumbnails and titles outside of the loop:
<?php $page_id = array('17', '15', '19', '13'); //stores multiple page ID in an array //render image for each page using foreach conditional loop foreach($page_id as $id){ if (has_post_thumbnail($id) ): $image = wp_get_attachment_image_src( get_post_thumbnail_id($id, 'thumbnail') ); endif; ?> <div class="teaser-box"> <h2><a href="<?php echo get_permalink($id); ?>" rel="bookmark"><?php echo get_the_title($id); ?></a></h2> <?php echo "<img src='".$image[0]."'>"; ?> </div> <?php } ?>