mredzovic
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Remove “nofollow” attribut on woocommerce productsHi?@igreqa,
What did you end up doing to resolve the issue? That would be helpful to me (and others) that come across this thread during searches as I have the same issue.Hello!
Thank you for your reply. I sent an email over.
Hoping to resolve soon!
-MForum: Fixing WordPress
In reply to: Help with: Redirect User (Role) from specific URL to another.Can anyone help?
- This reply was modified 2 years, 5 months ago by mredzovic.
Forum: Fixing WordPress
In reply to: Help with: Redirect User (Role) from specific URL to another.Tried the following as well..
function redirect_user_role() { if (( 'role' == $user_role ) && is_page(31440)) { wp_redirect('https://www.google.com/'); exit; } } add_action('template_redirect', 'redirect_user_role');
Also:
function wpse381872_login_redirect( $redirect_to, $request, $user ) { // turn the request url into a post-id $request_id = url_to_postid( $request ); if ( isset( $user->roles ) && is_array( $user->roles ) ) { // check for subscribers logging in via 31440 if ( 31440 === request_id && in_array( 'Test_Role', $user->roles ) ) { $redirect_to = 'https://www.google.com'; } } return $redirect_to; } add_filter( 'login_redirect', 'wpse381872_login_redirect', 10, 3 );
Forum: Fixing WordPress
In reply to: Help with: Redirect User (Role) from specific URL to another.Also tried this with no luck:
add_action('template_redirect', 'redirect_user_role'); function redirect_user_role() { global $current_user, $wpdb; $role = $wpdb->prefix . 'capabilities'; $current_user->role = array_keys($current_user->$role); $role = $current_user->role[0]; //user role if($role=='Test_Role' && is_page(31440)) { wp_redirect('https://www.google.com'); } }
Forum: Fixing WordPress
In reply to: Help with: Redirect User (Role) from specific URL to another.I’m currently logged in as a user in the “Test_Role” and when I go to access the page with ID 31440, it does not redirect me to google ??
Forum: Fixing WordPress
In reply to: Help with: Redirect User (Role) from specific URL to another.Can anyone help me with what I’m missing about this code that isn’t working?
add_action('template_redirect', 'redirect_user_role'); function redirect_user_role() { if(current_user_can('Test_Role') && is_page('31440')) { wp_redirect('https://www.google.com/'); } }
??
Forum: Fixing WordPress
In reply to: Help with: Redirect User (Role) from specific URL to another.Can anyone help?
I’m still having no luck accomplishing the following:
Logic:
IF user is logged in
AND is part of “ROLE”
AND is trying to access “PAGE-ID#1”
THEN redirect to “PAGE-ID#2”??
Forum: Fixing WordPress
In reply to: Help with: Redirect User (Role) from specific URL to another.No,
This does not do what I am looking to have done.
I’ve seen plugins that do this everywhere, but they only seem to do “login URL and logout URL” redirection.Again, I’m looking to have a very “specific” URL have a redirect behavior “dependent” on what role the user is a part of that is logged in. I do not want to tamper with the login or logout behaviors.
To reiterate:
I have product page variations, and I want to only show the according variation to users in specific roles.
I’d like it so that when a user logs in and clicks on the products page, the appropriate one will load depending on what role they are in.Short example:
Role “one” may have 100 users.
Role “two” may have 50 users.
Role “three” may have 1000 users.
Product page variation “variation1” would only be shown to users that are in role “one”
Product page variation “variation2” would only be shown to users that are in role “two”
Product page variation “variation3” would only be shown to users that are in role “three”If there is some way to massage that plugin to do what I’ve explained above, please let me know how! ??
- This reply was modified 2 years, 6 months ago by mredzovic.
Forum: Plugins
In reply to: [Brevo for WooCommerce] Issue with “Display an Opt-in Field at Checkout”Adding some more site info:
WooCommerce version is 6.1Forum: Plugins
In reply to: [XML Sitemap Generator for Google] Blog not being indexedQuestion:
An SEO team that I’m working with wants to know if there is a time-frame of when you think that the XML sitemap generator would have the ability to pull in those canonical links? They want to figure out if they should start producing a manual XML sitemap for the site.LMK! Thanks!
Forum: Plugins
In reply to: [XML Sitemap Generator for Google] Blog not being indexedIt would be fantastic to have the plugin pull in the canonical links! ??
As for the Settings > Reading… this is what I see:
“Your homepage displays: A static page (select below)”
“Home page: Home”
“Posts page: -Select-”
“Blog pages show at most: 10 posts”
“Syndication feeds show the most recent: 10 items”
“For each post in a feed, include: Full test”Forum: Plugins
In reply to: [XML Sitemap Generator for Google] Blog not being indexedWhere would I go to find out if the blog is set to use static pages for the homepage/blog page?
Forum: Plugins
In reply to: [XML Sitemap Generator for Google] Blog not being indexedThank you for the reply!!
For the Canonical links, here is an example:
This page:
https://hartfordrents.com/rent/pc-laptop-rental/
…has a canonical link reflecting the same link as pasted above. (Press Ctrl+U in Chrome and search/find “canonical”. You will see it matches.Now if you look at the xml site map here:
https://hartfordrents.com/sitemap.xml
search/find “pc-laptop-rental” and it will show up with “/rent-computing-gear/laptop-rental/” in the link.That link in the sitemap is the original/default link.
The way I was able to get the canonical link to be shorter and match the actual slug/url is by editing the page, scrolling down to the Yoast SEO section, clicking advanced, and manually adding a canonical URL.Hope this helps and very much looking forward to the fixes/patches!
Forum: Plugins
In reply to: [XML Sitemap Generator for Google] Blog not being indexedI’d also like to add that there is another issue I am having with this XML sitemap generator.
I have pages that I have added custom canonical links to.
The generator does not use these links in the sitemap.
Is there a way to force it to use the custom canonical link rather than the default one?Thanks in advance!