I have a Wordpress site, I have the Front Page settings right in the Reading settings, but when I goto my Wordpress site and I am not login, I get a 404 error and my page looks messed up. When I am login to Wordpress my Front Page looks like it should and I dont get a 404 page. Here is my site, why is this happening?


Here is my .htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Also I am unable to change the static front page in my settings, when I save it, nothing gets changed.

More information in another question I asked:

Issue with my theme

  • are you using any cache plugin??, If yes disable it and try again after clearing cache. – Harry Feb 21 '18 at 5:49
  • your site working fine now i have checked just display title wrong. Please check in private tab & change permalink one time first – Ravi Patel Feb 21 '18 at 6:06
  • Your theme or a plugin might be trying to redirect non-logged-in users to a page that doesn't exist. Try changing to a different theme to see if it stops doing that. If not, try disabling your plugins one at a time until it stops. You'll then know which one is causing the problem and can ask the developer of that plugin how to solve the problem. – Peter HvD Feb 21 '18 at 15:00
  • I did have a cacheing plugin, It was disabled, I enabled and then disabled it and it worked. – user979331 Feb 21 '18 at 18:48
  • I spoke too soon, the problem still exists. I think the problem is in my theme because when I switch to Twenty Seventeen it works! I dont get a 404 anymore, but when I switch it back to my theme, 404 problem is there – user979331 Feb 22 '18 at 3:52

i think problem is in your composer. try disable your composer and check if it is working. if not then try disable all your plugins one by one. if you are using cache disable it first.

  • Hello, how do I disable my composer? – user979331 Feb 23 '18 at 13:37
  • I have also disabled all plugins one by one....did not work – user979331 Feb 23 '18 at 13:38
  • which theme you are using? and what composer it that? – Atif Aqeel Feb 23 '18 at 13:47
  • The theme is called Wedding Planner, the developer before me was using and we are currently using the child version. WPBakery Page Builder is the composer? – user979331 Feb 23 '18 at 13:53
  • might be this is your theme. themeforest.net/item/wedding-planner-responsive-wedding-theme/… check your theme version and latest version which is available and same for the visual composer version. might be this is the issue. one more question when you created you child theme? is not child theme issue? have you called style correctly ? – Atif Aqeel Feb 23 '18 at 14:01

Make permalink structure to default ?p=ID to ensure .htaccess is the problem.

Try simply set "month and name" structure again, and see if it works.

or Try rewrite analyzer

I'm Not Promoting the plugin but it will help you.

  • I have tried playing with my permalink and nothing :( the problem still remains. I'll try the plugin. – user979331 Feb 23 '18 at 13:52
  • How do I use this plugin? What am I looking for? – user979331 Feb 23 '18 at 13:55

I just wanted to make a comment. Looking at your theme from themeforest. You stated that you had 1.6 loaded and the change log on themeforest states Version 1.8 (27 January 2018) - Various fixes & improvements (version 1.7 users, please deactivate & delete Visual Composer and install the one in version 1.8)

This is what I would do first. Update the theme and like suggested before switch out the Visual composer with the new one. I would also try turning off the Child theme just in case something broke there.

  • The old developer purchased the theme, the clients do not have access to theme forest creds – user979331 Feb 23 '18 at 18:41
  • 1
    just buy a license for it from theme forest that way you have not only the latest version but access to the theme developers support. – Ken Feb 23 '18 at 18:44

I was able to solve this problem, I found this code in my theme functions.php file:

function switch_homepage() {
    if ( is_user_logged_in() ) {
        $page = 738; // for logged in users
        update_option( 'page_on_front', $page );
        update_option( 'show_on_front', 'page' );
    } else {
        $page = 738; // for logged out users
        update_option( 'page_on_front', $page );
        update_option( 'show_on_front', 'page' );
add_action( 'init', 'switch_homepage' );

So I remove it and now everything is working

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.