How to Show Different Themes to Logged in Users in WordPress - How to Show Different Themes to Logged-in Users in WordPress

How to Show Different Themes to Logged-in Users in WordPress

In this example, we’ll use the is_user_logged_in() to display a different theme on our website for visitors: if(is_user_logged_in()) { function wpxss_set_my_custom_theme() { //replace your theme name here return ‘your-theme-name’; } add_filter( ‘template’, ‘wpxss_set_my_custom_theme’ ); add_filter( ‘stylesheet’, ‘wpxss_set_my_custom_theme’ ); } else { // leave the default theme active for visitors } The template and stylesheet filters are responsible to select the activated … Read full article →

Happy New Year WordPress 2023 - New Ideas For 2023? 🎊🥳🕺

New Ideas For 2023? 🎊🥳🕺

We wish all our readers a Happy and Healthy New Year! We hope you enjoyed WPXSS in 2022 and that you will keep reading our blog in the coming years! To make the site more interesting for you, I would like to hear from you, what you like to read on our blog!

I would greatly appreciate it if you can provide us with new ideas and suggestions on what we could write about in 2023. We like to have user-driven content – unique and helpful posts, that the vast majority of visitors find worth reading. So leave your ideas in our comment area and I will try my best to cover them in the upcoming year. 🥳

I wish everyone a Happy New Year!

stefanpejcic signature - New Ideas For 2023? 🎊🥳🕺
wpcli autocomplete - Setup tab completions for WP-CLI

Setup tab completions for WP-CLI

Tab completion is a useful time-saving feature of command line interfaces. To enable tab completion for WP-CLI We need to edit the ~/.bash_profile file. Step 1. In your home directory download WP-CLI tab completion file Step 2. Edit your ~/.bash_profile and add the following line: source ~/wp-completion.bash Save and exit. Step 3. Source the profile … Read full article →

Error connecting to Mailchimp 0 cURL error 28 Failed to connect to us17.api .mailchimp.com port 443 after 7309 ms Couldnt connect to server - Error connecting to Mailchimp: 0 cURL error 28: Failed to connect to us17.api.mailchimp.com port 443 after 7207 ms: Couldn't connect to server

Error connecting to Mailchimp: 0 cURL error 28: Failed to connect to us17.api.mailchimp.com port 443 after 7207 ms: Couldn’t connect to server

Error connecting to Mailchimp: 0 cURL error 28: Failed to connect to us17.api.mailchimp.com port 443 after 7207 ms: Couldn’t connect to server If none of the suggested solutions form this guide work: https://www.mc4wp.com/kb/solving-connectivity-issues/ Try to manually connect from your hosting server to the MailChimp server. First, try curl: if that fails, do traceroute (MTR) to see … Read full article →

wpcli regex search - Use Regex with WP CLI to 🔎 Search & Replace in Database

Use Regex with WP CLI to 🔎 Search & Replace in Database

When cleaning websites that have large databases, regular text editors can’t even open the database dumps (Notepad++ supports files up to 2GB in size). So to run a search and replace on large database dumps I suggest using regex-replace line-by-line in PHP, or setting up WPCLI and running regex search & replace. Here is a … Read full article →

How to exclude wp admin from Cloudflare - How to exclude wp-admin from ☁️ Cloudflare

How to exclude wp-admin from ☁️ Cloudflare

First and first, I must stress that this is a bad idea and that I do not recommend it. Why? Because you’ll remove all of Cloudflare’s protection for the wp-admin dashboard. Cloudflare waits 100 seconds for an HTTP response. If the origin doesn’t respond in that time, Cloudflare closes the connection and you’ll see “Error … Read full article →