WooCommerce – Show different terms and conditions for different user roles

I’m setting up a WooCommerce shop and it will have two types of customer/user roles – a standard retail customer/user role and a wholesale customer/user role.

Here’s the snag that I’ve hit – when a Wholesale customer is logged in, I need the Terms and Conditions link on the checkout page to go to a different T&C’s page.

I’ve tried a couple of different functions in functions.php to replace the link text but they don’t work.

Does anyone out there have any suggestions that I can try??

Thanks,

Bev

Run a code only on theme activation only during first activation

function clearwidgets(){   //stuff here only runs once, when the theme is activated for the 1st time }  register_activation_hook(__FILE__, 'clearwidgets'); 

And the code I am trying to execute is this:

    add_filter( 'sidebars_widgets', 'unset_sidebar_widget' );  function unset_sidebar_widget( $  sidebars_widgets ) { unset( $  sidebars_widgets[ '$  sidebar_id' ] ); return $  sidebars_widgets; } 

That means when the first time the theme is installed it should clear away all the default widget set by WordPress.

Where am I going wrong because the desired result is not achieved? Please suggest me the fix or direct me in the direction so that I can troubleshoot.

How can I post exact same post but with a few things changed? (with some sort of Automation)

I wanna duplicate some of my posts but want to change a few variables. For example, I would just like to make some variable in my posts that will be changed every time I give inputs. These can be links or one word changes in post title or somewhere in post. How can I do it? (see an example below where XXXX and Y are variables)

Post Title: Hello this is a sample Post with XXXX – Read now!

Body of my post:

Hey this is my post welcome, this is post with XXXX. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras dui mi, facilisis quis consequat id, blandit et enim. Nulla viverra tellus elementum ligula vulputate, vel venenatis nisi facilisis. Vivamus in mi eu ipsum molestie bibendum a sed purus. Read more here Y(link).

Reset Password – change from name and email address. It stucks at admin. Want to change it to info

At the admin dashboard of my wordpress under wordpress settings > general my admin email is set as info@mydomain.com

Here is my issue. When a customer wants to reset her or his password automated mail is sending from admin@www.mydomain.com instead of the admin email I setup at the settings > general

Basically I want to change from email address from admin@www.domain.com to info@mydomain.com for automated reset password emails

Thanks

How to create custom administrator panel page/subpage?

I’m struggling with creating custom subpages in wordpress admin panel. I’m interested in creating any custom subpage, which is going to look like a default administrator screens with some modifications. At best I’m trying to achieve custom comments subpage, showing comments related only to my custom post type I’ve created, but any tips on how to interrupt default render of admin screens in wp admin panel would be appreciated.

I’m not sure what hooks to use, or where are the files responsible for rendering pages like comments, posts, settings ect.

I want to see how they are written so I could possibly copy-paste the code and after some changes – callback it with the function “add_submenu_page()” or:

add_comments_page( $ page_title, $ menu_title, $ capability, $ menu_slug, $ function);

Any tips where to look for hooks, files or information on how any page in panel admin is rendered would be very appreciated. Thanks in advance!

HTML not resizing

I am currently working on my business website. I am using ready made HTML code provided from a 3rd party for the front page. The output is small and can not be resized. On the 3rd party sites it shows me the html output is larger in size and has no scroll on the side. I tried the appearance layout and no option for resize. I disabled many plugins and still nothing. I changed out theme and still same output. I don’t know if the issue lies with code below or CSS. Any help would be greatly appreciated or steered in the right direction.

enter image description here