Go back to my home page

You can use woocommerce_thankyou action to achieve above add_action( ‘woocommerce_thankyou’, ‘custom_goBack’); function custom_goBack( $order_id ) { echo ‘<a href=”‘.get_home_url().'”>Go Back</a>’; }

How to show Specific URL of WordPress on Any one Specific IP only?

A simple way of doing this would be to use template_redirect and return a 404 status code if the clients ip address does not match the desired one: add_action(‘template_redirect’, function () { /** @var \WP_Query $wp_query */ global $wp_query; if ($wp_query->get_queried_object()->post_name === ‘hello-world’) { $address = $_SERVER[‘HTTP_X_FORWARDED_FOR’] ?? $_SERVER[‘REMOTE_ADDR’]; if ($address !== ‘172.20.0.1’) { // … Read more

sub.menu’s not working

Your problem seems to be within your .htaccess rewrites. First thing to try: change the permalink structure back to normal (index.php?p=375) and see if the submenus work then. If they do then problem is with permalinks. Sorry, I know this should probably be a comment not an answer, but I don’t have enough points to … Read more

Permalink structure and dedicated comment pages

You can change the permalink setting to /p%post_id%, but this will also set the front property of the WP_Rewrite object to /p, so some URLs will also get this in front (/pauthor for example). You can counter this by changing the $wp_rewrite->front property again: add_action( ‘permalink_structure_changed’, ‘wpse5595_rewrite_front_reset’ ); add_action( ‘init’, ‘wpse5595_rewrite_front_reset’ ); function wpse5595_rewrite_front_reset() { … Read more