WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 404 error after setting up a child theme (13 posts)

  1. Barnez
    Member
    Posted 1 year ago #

    Hi,

    I am using the Breakout theme, and set up a child theme so I can insert custom css without modifying the theme's core files.

    I followed the advice on the WordPress codex page, and the site seems to be functioning fine. However, when I check the site load on websitestpage.org, the waterfall shows the main theme's css stylesheet as a 404 error.

    The site is http://www.proofscience.com and the archived waterfall is linked here

    Should I be concerned about this, and have I made an error in setting up my child theme?

  2. Tara
    Member
    Posted 1 year ago #

    Try resetting your permalinks through Settings > Permalinks. If this does not work, you may have to edit the .htaccess file manually.
    `# 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]
    </IfModule>
    # END WordPress`If you are not familiar with editing your .htaccess file, contact your hosting provider to ask them to turn on mod_rewrite rules. There is more information on pretty permalinks in the WordPress Codex.

  3. Barnez
    Member
    Posted 1 year ago #

    Thanks for the advice Tara.
    I tried resetting the permalinks and clearing the cache, but the 404 error was still showing.

    The exact htaccess code you suggest is already at the base of the file.

    One point of potential relevance,earlier the site was making two calls, one for http://proofscience.com and another for http://www.proofscience.com . To eliminate one call, I changed the site and url address in the settings-general tab to include the 'www' in both addresses. This resolved the duplicate call, but perhaps this has affected the permalinks?

  4. Tara
    Member
    Posted 1 year ago #

    review this codex to properly change URL:
    http://codex.wordpress.org/Changing_The_Site_URL

  5. Barnez
    Member
    Posted 1 year ago #

    Thanks for the advice Tara.

    I followed the edit functions.php process for changing the site url, adding

    update_option('siteurl','http://www.proofscience.com');
    update_option('home','http://www.proofscience.com');

    after the "<?php" line in the child theme's functions php file. Then logged out and in several times, before removing the code and clearing the cache.

    Unfortunately this hasn't helped (I tried the same process in the parent theme's functions.php also)

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Check your wp-config.php file in case a previous attempt to change urls was made via that file.

  7. Barnez
    Member
    Posted 1 year ago #

    Thanks Esmi. I have checked the wp-config file, and there is no reference to the site through an http path, only /home/....

    The WordPress Codex page Tara recommended suggests changing the url in the database directly, or adding the following code to the wp-config:

    define('WP_HOME','http://example.com');
    define('WP_SITEURL','http://example.com');

    Are these my best choices?

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    Yes. That particular method has worked successfully a number of times for me without any problems.

  9. Barnez
    Member
    Posted 1 year ago #

    Hi Esmi,

    I tried manually setting the url in the wp-config file and edited one options value in the database (ossdl_off_cdn_url) from http://sitename.com to http://www.sitename.com

    Unfortunately, neither change seems to have resolved the issue.

  10. esmi
    Forum Moderator
    Posted 1 year ago #

    Can you please confirm the site's current url?

  11. Barnez
    Member
    Posted 1 year ago #

  12. esmi
    Forum Moderator
    Posted 1 year ago #

    There's nothing wrong with the parent theme's style.css file. It can be found at http://www.proofscience.com/wp-content/themes/breakout/style.css

    However, if you check that file, you'll see that it says:

    /* This theme's primary styles can be found in /assets/css/theme.css */

    And http://www.proofscience.com/wp-content/themes/breakout/css/theme.css is also present & correct.

    As the parent is a commercial theme, you will need to seek any further support from the theme@s developer. We do not have access to - nor do we support - commercial products here.

  13. Barnez
    Member
    Posted 1 year ago #

    I understand. I will go ahead and contact the theme developer directly

    Many thanks for your advice, and pointing me in the fright direction

Topic Closed

This topic has been closed to new replies.

About this Topic