• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Solution / Catchable fatal error: Argument 1 passed to Genesis_Admin_CPT_Archive_Settings

Catchable fatal error: Argument 1 passed to Genesis_Admin_CPT_Archive_Settings

Last updated on November 15, 2016 by Sal Ferrarello

You’ve probably arrived on this page because you updated to WordPress 4.6 and now all of the backend pages (those in /wp-admin) are showing an error similar to the following.

Catchable fatal error: Argument 1 passed to Genesis_Admin_CPT_Archive_Settings::__construct() must be an instance of stdClass, instance of WP_Post_Type given, called in /srv/www/genesis/htdocs/wp-content/themes/genesis/lib/admin/menu.php on line 122 and defined in /srv/www/genesis/htdocs/wp-content/themes/genesis/lib/admin/cpt-archive-settings.php on line 38

The Problem

You’re using the Genesis Theme Framework on your WordPress website. WordPress updated something in version 4.6 that caused a problem with Genesis versions 2.3.0 and below. A new version of Genesis was released to fix this issue a few weeks before WordPress 4.6 was released. Unfortunately, if you update WordPress before updating Genesis you get this issue.

How to Fix It

We’re going to temporarily disable a small part of Genesis, the Custom Post Type archive pages, which will allow you to update to the latest version of Genesis.

Step 1: Add This Code to the Bottom of functions.php

You or your developer should add this code to the bottom of the functions.php file of the Genesis theme. It is most likely located at wp-content/themes/genesis/functions.php. If you’re unsure how to do this, see the How to Edit functions.php section on this page.

/**
 * Disable Genesis CPT Archives
 *
 * This is useful to temporarily disable the Genesis CPT Archives,
 * if you can not log into your WordPress site 
 * after updating to WordPress 4.6.
 *
 * See
 * http://salcode.com/wp46/ 
 * for more information.
 */
add_filter( 'genesis_cpt_archives_args', 'fe_modify_args_to_include_non_existant_name' );
function fe_modify_args_to_include_non_existant_name( $args ) {
    $args['name'] = 'this-is-a-name-that-does-not-exist-resulting-in-no-matching-cpts';
    return $args;
}

Step 2: Log into Your WordPress Site

Example WordPress Login Box

Step 3: Update to the Latest Version of Genesis

Update to Genesis 2.3.1

Geeky Details

For those of you interested in the geeky details of this issue.

Prior to Genesis 2.3.1, the constructor for Genesis_Admin_CPT_Archive_Settings was using type hinting to define the $post_type argument being passed into the constructor as being of the class stdClass.

As of WordPress 4.6, the stdClass being used for $post_type has been replaced with a newly introduced class WP_Post_Type, which though it still behaves the same way does not match the expected stdClass. This mismatch caused the PHP error.

Updates

Update 1: Now with 25% fewer steps!

Originally this post included a Step 4, which instructed you to remove the code added to functions.php. Some of the friendly readers of this post pointed out this step was unnecessary since during the Genesis Update functions.php gets overwritten and therefore the code is no longer there to be removed. Thanks to all those who pointed out my error.

Update 2: How to Edit functions.php

In the comments, I’ve received a lot of inquires about how to edit functions.php. Unfortunately, this is beyond the scope of this post. Hopefully, these notes will put you on the right path.

  • If you have cPanel on your server, How to Edit a File with cPanel
  • Check with your website host and ask about SFTP (or FTP) access. If you’re not sure who your website host is, you can use whoishostingthis.com

Short URL to this Post

http://salcode.com/wp46

Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a senior backend engineer.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on EmailShare on Reddit

Filed Under: Computing, Solution Tagged With: Genesis, WordPress

Reader Interactions

Comments

  1. David Dibert says

    August 16, 2016 at 8:09 pm

    Great post. Thanks!

    Reply
  2. Pam Saxon says

    August 16, 2016 at 10:23 pm

    VERY helpful. You saved my bacon! Much gratitude your way!

    Reply
  3. Jose says

    August 17, 2016 at 2:47 am

    Awesome article. Thank you.

    Reply
  4. Dritan says

    August 17, 2016 at 4:00 am

    Thanks so much. This article was very helpful and very awesome.

    Reply
  5. Peter says

    August 17, 2016 at 5:11 am

    This helped me out of a tight spot this morning. Thanks!

    Reply
  6. Honesting says

    August 17, 2016 at 6:40 am

    It worked perfectly, thank you.

    Reply
  7. Lisa Marie says

    August 17, 2016 at 7:35 am

    Hello, thank you for the post but I can’t seem to access /wp-content/themes/genesis/functions.php

    It just shows a “Fatal error: Call to undefined function do_action() in /home3/tesswhit/public_html/wp-content/themes/genesis/lib/init.php on line 15”

    Reply
    • Sal Ferrarello says

      August 17, 2016 at 9:06 am

      Hi Lisa,

      It sounds like you’re going to the file in your web browser, e.g. going to a link like http://example.com/wp-content/themes/genesis/functions.php

      Instead, you need to access the code in functions.php. Generally, this is done via SFTP or through you host’s control panel.

      Reply
      • Harry says

        August 22, 2016 at 8:11 pm

        How is this done through Cpanel?

        Reply
        • Sal Ferrarello says

          August 24, 2016 at 9:09 am

          Hi Harry,

          I’ve updated the post with some links on how to edit your functions.php file. I hope these help.

          Reply
    • Steve says

      August 24, 2016 at 3:51 am

      Lisa, you can also edit it in cpanel file manager, assuming you use cpanel

      Reply
  8. Michelle says

    August 17, 2016 at 5:07 pm

    Quick and easy, you’re a Godsend. Thanks!

    Reply
  9. EDog says

    August 17, 2016 at 7:49 pm

    Great post. Thank you!

    Reply
  10. ZD says

    August 17, 2016 at 8:34 pm

    Many thanks! This was very helpful 🙂

    Reply
  11. Paris Tuzun says

    August 17, 2016 at 10:24 pm

    Thanks, Sal. I had a mini heart attack when I saw that error today. You’re a life saver.

    Reply
  12. Julia says

    August 18, 2016 at 2:58 pm

    Thank you so so much :)))))

    Reply
  13. Denise Hamlin says

    August 18, 2016 at 4:35 pm

    Thanks. I go on vacation and the first thing I do when I come back is break my own site. Your post was a life saver. Thank you!

    Just one thing. I didn’t need to remove the code I added to the functions.php file. It seems it was removed automatically. At least it was gone when I went to remove it. I don’t completely understand why, but I guess the main thing is it’s gone.

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 8:44 am

      Thanks Denise, I’ve updated this article to correct this error. I appreciate the feedback.

      Reply
  14. Cecil says

    August 18, 2016 at 5:32 pm

    Thanks for the help!

    Reply
  15. Amanda Henham says

    August 19, 2016 at 1:30 am

    Thanks for sharing this information! I am having additional issues. I tried to update the Genesis theme + WordPress and a Fatal error has come up, very similar to what you have mentioned, however, I can’t log in to my site now, as the error comes up. I can go to a new browser window and get to my site like a normal user, and it shows I am in fact logged in. I then try and enter the dashboard, and the error comes up. No matter what part of my site menu (dashboard, updates, customize, etc.), I cannot get to any part without the error. What do I need to do to be able to access the site from my admin side?

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 9:37 am

      Hi Amanda,

      It sounds like you still need to update Genesis to the latest version. I’ve added some links on how to update functions.php, I hope these are helpful.

      Reply
  16. Verity says

    August 19, 2016 at 2:53 am

    Hi Sal

    Thanks heaps, this allowed me to log in. However I had already updated Genesis prior to updating WordPress. If I remove that code which allowed me to log in I again can’t log in. Any ideas on what I can do to resolve that?

    Reply
    • Verity says

      August 19, 2016 at 3:04 am

      PS I checked again, sorry, the current Genesis theme is actually 2.2.7, however there are no updates visibly available subsequent to the one I did recently. Our active theme is Executive Pro, a child theme of Genesis, and it’s current version is 3.0.0

      Reply
      • Verity says

        August 19, 2016 at 5:34 am

        Further to previous two messages, once I ticked the “check for updates” box in Genesis theme settings, the 2.3.1 update instantly became available within WordPress. Problem solved and functions.php file also returned to default so I didn’t need to remove the added code. Thank you!

        Reply
  17. Joaquin says

    August 19, 2016 at 5:15 am

    Thank for your help. It solves the problem.

    Reply
  18. alie says

    August 19, 2016 at 5:16 am

    ben heel blij met je 🙂
    Done!

    Reply
  19. Aaron says

    August 19, 2016 at 10:09 am

    Thank you for the knowledge, helped out a great deal!

    Reply
  20. Dave says

    August 19, 2016 at 11:04 am

    Great fix, Sal. Much appreciated.

    Reply
  21. Claudia says

    August 19, 2016 at 11:35 am

    it won’t even bring me to the dashboard because I automatically get the error after i log in so how do i install the genesis theme again?

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 9:10 am

      Hi Claudia,

      I’ve updated the post with some links on how to edit your functions.php file. I hope these help.

      Reply
  22. Carrie says

    August 19, 2016 at 5:05 pm

    Awesome sauce! I had a client who didn’t take my advice and update her Genesis theme, of course she was in a panic, but your post had her back up & running in under a minute. THANK YOU!

    Reply
  23. Kit Johnson says

    August 19, 2016 at 7:40 pm

    Saved my bacon!

    Reply
  24. Brad says

    August 20, 2016 at 3:15 am

    Still get this with genesis 2.3.1 on the admin menu page in executive pro & workstation pro themes

    Notice: Trying to get property of non-object in wp-admin/nav-menus.php on line 818

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 9:41 am

      Hi Brad,

      This notice sounds unrelated to the Genesis 2.3.1 update. Generally, notices are not displayed on a live website. You might want to check out WordPress Debug Settings.

      Best of luck.

      Reply
  25. Jamal says

    August 20, 2016 at 4:28 am

    Thanks for this tutorial 🙂

    +5

    Reply
  26. kate says

    August 20, 2016 at 6:33 am

    LIFESAVER – Thank you SO much for posting 🙂

    Reply
  27. Tia Johnson says

    August 20, 2016 at 4:24 pm

    I received an email that my WP was automatically updated to 4.6 but I still can’t log into my account. without error Catchable fatal error:

    Argument 1 passed to Genesis_Admin_CPT_Archive_Settings::__construct() must be an instance of stdClass, instance of WP_Post_Type given, called in /home2/tiamarie/public_html/wp-content/themes/genesis/lib/admin/menu.php on line 122 and defined in /home2/tiamarie/public_html/wp-content/themes/genesis/lib/admin/cpt-archive-settings.php on line 38

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 9:13 am

      Hi Tia,

      It sounds like you still need to update Genesis to 2.3.1. Hopefully, the steps outlined in this post will help.

      Reply
  28. Brian says

    August 20, 2016 at 5:01 pm

    Hero status unlocked. Thank you.

    Reply
  29. nomran says

    August 20, 2016 at 7:39 pm

    Tried your fix
    Now I get this
    Parse error: syntax error, unexpected ‘}’ in /home/boule039/public_html/wp-content/themes/executive-pro/functions.php on line 20

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 8:49 am

      Hi Nomran,

      It sounds like you have an extra closing brace ‘}’ in your functions.php file. I’m guessing it got accidentally included when you were adding the code from this post.

      Reply
  30. Luis Centeno says

    August 20, 2016 at 7:56 pm

    Hi,

    Thank you! It worked – one question though, When I went back into my FTP and opened the file to delete the extra code, it was already gone. Is this normal?

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 8:49 am

      Hi Luis,

      You are absolutely correct, this was an error in my original post. I’ve updated this article to correct this error. I appreciate the feedback.

      Reply
  31. Vincent says

    August 21, 2016 at 1:29 pm

    Much obliged. Was going to investigate but searched first on a whim. Perfect!

    Reply
  32. Jon de Mol says

    August 22, 2016 at 2:56 am

    Great, you made my day!!!
    Thanks a lot.

    Reply
  33. Rick Tuttle says

    August 22, 2016 at 11:12 am

    Saved my life, thanks for posting this easy fix!

    Reply
  34. Ted Vieira says

    August 22, 2016 at 12:12 pm

    Hi,

    Thank you so much for this article. I did copy that code to my Genesis functions.php file, but I’m still getting the error message.

    I even just manually uploaded Genesis 2.3.1 via ftp, but still no luck.

    Thanks again!

    Ted

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 8:57 am

      Hi Ted,

      I would double-check and make sure the error message you’re getting is the same one described in this post.

      I would also consider disabling all plugins as a testing step.

      Best of luck.

      Reply
  35. Rachael says

    August 22, 2016 at 1:44 pm

    Thank you! I was stressed when I tried to login to my site and got this error. All fixed.

    Reply
  36. Eric Blackwell says

    August 22, 2016 at 1:50 pm

    Very helpful. Thanks Sal

    Reply
  37. Kat says

    August 22, 2016 at 4:15 pm

    Thank you!
    I thought we got hacked for a moment. Very grateful.

    Reply
  38. Paul Ramsden says

    August 22, 2016 at 4:33 pm

    Awesome work! That’s saved me a mini heart attack and lots of frustration

    Reply
  39. Harry says

    August 22, 2016 at 7:47 pm

    Hi! Great article! I accidentally forgot to update Genesis before updating WP. So I’m receiving the error and can’t login. How do I “Add This Code to the Bottom of functions.php” if I can’t access the WP login?

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 9:14 am

      Hi Harry,

      I’ve updated the post with some links on how to edit your functions.php file. I hope these help.

      Reply
  40. Eating Chocolate says

    August 22, 2016 at 9:25 pm

    THANK YOU!!!!

    Reply
  41. Dawn Elise says

    August 23, 2016 at 12:06 am

    Sal, You are wonderful, thank you! You just saved me a heck of a lot of time. xoxo

    Reply
  42. Angela Schofield says

    August 23, 2016 at 2:03 pm

    Great advice, worked easy and perfect. Thank you very much. I highly appreciate your articles.

    Reply
  43. Rob says

    August 24, 2016 at 2:38 am

    Thanks this saved me!

    Reply
  44. Paula says

    August 24, 2016 at 11:44 am

    Thanks for your very helpful post. As a newbie to website building with WordPress, I found it was easier for my hosting service to make the changes because I was afraid of doing more damage.

    I have a newbie question – do I make the upgrades to WordPress and Genesis as soon as they appear on the Dashboard? Is there a sequence – Genesis first, then WordPress?

    Thanks again.

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 3:41 pm

      Hi Paula,

      I’m glad to hear you got things sorted.

      There are a lot of conflicting opinions on the proper order to update WordPress components. Personally, I update them in this order.

      • Plugins
      • Themes
      • WordPress Core
      Reply
  45. Jane says

    August 24, 2016 at 1:48 pm

    Thanks Sal, you made that so easy.

    Yey!

    Reply
  46. Breanne says

    August 24, 2016 at 10:54 pm

    OMG! This saved me. Thanks so much!

    Question, should we go into the genesis function again after we update and remove the code we added in?

    Thanks!!!

    Reply
    • Sal Ferrarello says

      August 24, 2016 at 11:02 pm

      Hi Breanne,

      You don’t need to remove the code, since the functions.php file gets overwritten on update. (Though I didn’t realize this initially and I had to update this post)

      Reply
  47. Fran Eleazer says

    August 25, 2016 at 4:24 pm

    I got the memo to update Genesis before WordPress 4.6 (thank you Lindsey @prettydarncute), but one of my clients didn’t. Your fix was a lifesaver, and made me look REALLY smart!!!

    Thanks!

    Reply
  48. Rhonda says

    August 25, 2016 at 5:01 pm

    Thank you! Just came in very handy! (Client hadn’t logged in for a long time and therefore didn’t update Genesis, WP automatically updated, and…)

    Reply
  49. Darryl says

    August 25, 2016 at 10:08 pm

    Thanks so much for this post as it really helped me out tremendously. Bless you.

    Reply
  50. Niyshia says

    August 26, 2016 at 8:54 am

    Thanks so much! This was just the fix I needed.

    Reply
  51. Tony says

    August 26, 2016 at 8:57 am

    Thanks! Super helpful.

    Reply
  52. Deborah Swain says

    August 26, 2016 at 10:17 am

    HUGE thank you!

    Reply
  53. Barbara says

    August 26, 2016 at 2:05 pm

    Thank you! This post saved the day. And maybe this issue will nudge the client to letting me do the updates as part of a maintenance contract. So hard to convince older clients that not maintaining their site is going to break things or worse…so thanks again!

    Reply
  54. Neil Parker says

    August 27, 2016 at 3:43 am

    🙂 More thanks

    Reply
  55. Shannon Mendez says

    August 27, 2016 at 10:47 am

    Thank you!

    Reply
  56. Nervous Girl says

    August 27, 2016 at 7:18 pm

    UGH, THANK YOU. I was on the verge of a mini panic attack.

    Reply
  57. mdnicerio says

    August 31, 2016 at 11:59 pm

    thanks you save my day 🙂

    Reply
  58. John K says

    September 5, 2016 at 7:59 pm

    This post is a lifesaver! Thanks so much!!

    Reply
  59. Karen C says

    September 6, 2016 at 10:13 am

    Thanks for this! Quickly got me back in and Saved me tons of time.

    Reply
  60. Mattia Frigeri says

    September 9, 2016 at 11:27 am

    Saved my day, man.

    Reply
  61. Amanda Garrett says

    September 9, 2016 at 2:43 pm

    This was a life-saver! Thank you! Not only did I fix my problem, but I learned some new things in the process! So helpful!

    Reply
  62. Annie - The Ranting Latina says

    September 12, 2016 at 1:10 pm

    Thank you, thank you, thank you! Life saver :).

    Reply
  63. Kim Woodbridge says

    September 13, 2016 at 8:52 am

    Thank you so much! I was having this problem on a couple of sites and your solution cleared it right up for me. I really appreciate you posting this …

    Reply
  64. Mike Hemberger says

    September 14, 2016 at 9:00 am

    I knew I was going to need this, and this morning I finally did. An old client emailed me in a panic. Thanks for the nice, quick fix.

    Reply
  65. Jude says

    September 21, 2016 at 12:11 pm

    Thanks, you’re a life-saver.

    Reply
  66. Lowell says

    September 22, 2016 at 10:32 am

    Thank you! Saved me from pulling out what little hair I have!

    Reply
  67. Swimmer Media says

    September 25, 2016 at 11:24 pm

    Thanks for this info and code. Saved me hours of work on a client site.

    Reply
  68. Carol Harkins says

    September 30, 2016 at 1:05 pm

    Thanks for the great article! I’m late to the party here, but you saved me too.

    Reply
  69. Maria says

    October 2, 2016 at 12:50 am

    HELP please!! I looked for the functions.php file and I don’t see it. I followed the path wp-content/themes/genesis/ and then there two directories: images and lib. I opened lib and there is a functions directory but no functions.php file. Is there another way to fix this?? Or can I modify another file to get the same fix? These are the files inside the functions directory: breadcrumb.php, compat.php, deprecated.php, feed.php, formatting.php, general.php, image.php, layout.php, markup.php, menu.php, options.php, seo.php, upgrade.php and widgetize.php.
    I looked inside all the directories and I cannot find it.
    Thanks in advance!!

    Reply
    • Maria says

      October 2, 2016 at 1:10 am

      Found it!! Thank you so much for sharing your knowledge and information.

      Reply
  70. Jordan says

    October 2, 2016 at 3:48 pm

    Thanks Sal! It’s always great to search Google for a problem and instantly find someone with a well-written fix!

    Reply
  71. Kristy Morton says

    October 14, 2016 at 8:50 am

    You’re a lifesaver – such as well written post too.

    Thanks!

    Reply
  72. dbrooke says

    October 21, 2016 at 5:04 pm

    awesome!

    Reply
  73. Jerry says

    October 25, 2016 at 1:07 am

    Thank you very much, such a simple solution and now I am back in the Admin section. Perfect!

    Reply
  74. Allison says

    October 26, 2016 at 1:15 pm

    This worked beautifully, thank you so much!!!

    Reply
  75. Sal says

    October 26, 2016 at 2:57 pm

    thank you!

    Reply
  76. Linda says

    October 29, 2016 at 12:31 pm

    Hi!
    I just tried your solution different times, but still can’t log in to my dashboard, instead I get this error code:

    “Warning: Cannot modify header information – headers already sent by (output started at /homepages/6/d507915940/htdocs/clickandbuilds/WordPress/Photoliebe/wp-content/themes/genesis/functions.php:449) in /homepages/6/d507915940/htdocs/clickandbuilds/WordPress/Photoliebe/wp-includes/pluggable.php on line 1174”

    Do you have any tips what I could do? Also, the code I added to the function.php is now shown on the top of my website 🙁
    What did I do wrong?

    Reply
    • Sal Ferrarello says

      October 29, 2016 at 11:32 pm

      Hi Linda,

      It sounds like the code you added is being treated as raw text rather than as PHP code. This happens most often when the code is not inside <?php and ?>.

      My guess is your functions.php file had a closing PHP tag (?>) at the end of it and when you added the code from this article to the end of the file, it is outside the PHP block and treated like text.

      This is concerning to me because generally the Genesis functions.php does not have a closing PHP tag (?>) because you don’t need one because PHP automatically closes the block at the end of the file.

      This is another guess but I suspect there is custom code in your functions.php, which will be overwritten when you update Genesis. If I’m correct about the custom code in functions.php, you’ll want to make a copy of the file on your local machine before updating.

      In any case, as a next step I’d try deleting the last closing PHP tag (?>) that appears in functions.php. Best of luck.

      Reply
  77. Glenn says

    November 4, 2016 at 6:35 pm

    I recently made the mistake of updating WordPress and then Genesis afterwards.

    Subsequently, my category and tag pages are now blank to the white screen of death. I can log in to my control panel, and my regular pages and posts are visible, but I can’t fix the category and tag pages.

    Would inserting your code in the Genesis functions.php file correct the problem with the category and tag pages?

    Reply
    • Sal Ferrarello says

      November 5, 2016 at 8:53 am

      Hi Glenn, it looks like you’re running Genesis 2.2.7, while the latest is 2.4.2. Since you’re able to log in to the backend of WordPress, you shouldn’t need the fix in the this post. I’d start with updating Genesis and go from there.

      Reply
  78. Tracy says

    November 13, 2016 at 12:25 pm

    I made a HUGE mistake today and updated my new WordPress with updating Genesis first. I can not log into my wp-admin to even try and correct. I just continue to get this error when I log in…
    Catchable fatal error: Argument 1 passed to Genesis_Admin_CPT_Archive_Settings::__construct() must be an instance of stdClass, instance of WP_Post_Type given, called in /home/hh96466679/public_html/wp-content/themes/genesis/lib/admin/menu.php on line 122 and defined in /home/hh96466679/public_html/wp-content/themes/genesis/lib/admin/cpt-archive-settings.php on line 38

    What can I do to try and UNDO this horrible error?

    Reply
    • Sal Ferrarello says

      November 14, 2016 at 9:35 am

      Hi Tracy,

      Near the top of this page there is a section called How to Fix It with three steps listed. These are the three steps I use when I’m correcting this problem. I hope this helps.

      Reply
      • Tracy says

        November 15, 2016 at 10:15 am

        Thank you for this information. However, I am unable to log into my wp admin to attempt any corrections. Is there a recommended way to be able to log in to my account to attempt this fix?

        Reply
        • Sal Ferrarello says

          November 15, 2016 at 4:41 pm

          Hi Tracy,

          Please check out the How to Edit functions.php section above. I can see how this section is not immediately obvious and I’ve now added a link to it within the Step 1 description. Best of luck.

          Reply
  79. Niraj says

    November 24, 2016 at 12:56 am

    thanks

    Reply
  80. Matt Kieffer says

    December 2, 2016 at 11:59 am

    Sal – Well DONE!

    Thank you

    Reply
  81. Ryan says

    December 7, 2016 at 11:50 am

    So this worked, but the site was messed up after the upgrade…. I had to restore from backup

    Reply
    • Sal Ferrarello says

      December 7, 2016 at 12:08 pm

      This is the first I’ve heard of something like this. I’ll definitely keep me eye out for anything like this. If you have any more information (e.g. screenshots of the site looking broken, the versions of WP & Genesis you had, etc.), I’d be interested to hear more about it.

      Reply
  82. diane says

    December 9, 2016 at 12:06 am

    i tried step 1 and i still can’t login to my site 🙁 any tips?

    Reply
    • Sal Ferrarello says

      December 9, 2016 at 9:27 am

      Hi Diane,

      Assuming you are talking about your site linked here in the comments, stylecontext.com, it looks like you are running the latest version of Genesis at the time of my writing this (2.4.2), so it looks like a different issue preventing you from logging in. Sorry I don’t have more helpful information.

      Reply
  83. Boris Kan says

    January 9, 2017 at 10:54 pm

    Thank you!!

    Reply
  84. Wally says

    January 13, 2017 at 10:04 am

    I added the code to the bottom of the file and got this error: Parse error: syntax error, unexpected ‘add_filter’ (T_STRING), expecting function (T_FUNCTION)

    Reply
    • Sal Ferrarello says

      January 13, 2017 at 12:22 pm

      Hi Wally,

      It sounds like some of the code that appears before the new code you added accidentally got modified.

      This should be the line directly before the code you added.

      require_once( dirname( __FILE__ ) . '/lib/init.php' );

      My initial guess is the semi-colon (;) at the end of this line is missing.

      Reply
  85. Jordi says

    January 18, 2017 at 6:25 am

    Hi Sal,

    Thanks for this useful information. I’ve done it, but when I login I get this message:

    “You don’t have permissions to access this page”.

    My context is:
    – I have a wp multisite with genesis.
    – Today I’ve updated to wp 4.7.1 (did not know I had to update Genesis first …).
    – The consequences have been two type of errors when accessing to wp:

    (1) Catchable fatal error: Argument 1 passed to Genesis_Admin_CPT_Archive_Settings::__construct() must be an instance of stdClass, instance of WP_Post_Type given, called in /homepages/6/d316790346/htdocs/wp/wp-content/themes/genesis/lib/admin/menu.php on line 122 and defined in /homepages/6/d316790346/htdocs/wp/wp-content/themes/genesis/lib/admin/cpt-archive-settings.php on line 38

    (2) “You don’t have permissions to access this page”.

    Googleing for “Catchable fatal error: Argument 1 passed to Genesis_Admin_CPT_Archive_Settings” I’ve found your post, and I’ve made the change in functions.php file.

    But, can’t access the admin panel, where I could do the next step you suggested to update Genesis. Still get the message: “You don’t have permissions to access this page”

    Any suggestion?

    Many thanks in advance!

    Regards,
    Jordi

    Reply
    • Sal Ferrarello says

      January 18, 2017 at 10:33 am

      Hi Jordi,

      If the website you provided in your comment is the relevant website, it looks like your upgrade to Genesis 2.4.2 is complete (I’m basing this on the information at /wp-content/themes/genesis/style.css on your site).

      I suspect the “You don’t have permissions to access this page” error is unrelated to Genesis but this is just a guess. While it is rather technical, there is some information on this WordPress stackexchange article Troubleshooting a “You do not have sufficient permissions to access this page” error. Good luck, I know troubleshooting errors is not a lot of fun.

      Reply
  86. Tom Murphy says

    February 1, 2017 at 5:09 pm

    Thanks! Worked like a charm. Again able to access the backend and edit our website.

    Reply
  87. Tony says

    February 2, 2017 at 7:42 pm

    Thank you for sharing…been very helpful on many sites!

    Reply
  88. Cindy says

    February 5, 2017 at 12:52 pm

    Thank you! I’m not a programmer and get nervous changing PHP files directly, but I had to do something! Your instructions worked perfectly! THANK YOU!

    Reply
  89. Belinda Pollard says

    April 20, 2017 at 1:37 am

    You are amazing. Thank you so much. FTP freaks me out, so being able to do it through CPanel was wonderful. 🙂

    Reply
  90. Elise says

    May 16, 2017 at 4:20 pm

    Your instructions worked perfectly, thank you SO much!! You really know your stuff when you can explain how to fix things easy enough for a non-technical people. 🙂

    Reply
  91. Rovi Domingo says

    May 17, 2017 at 1:39 am

    Thanks a lot. a great help.

    Reply
  92. Adriana Peña says

    April 16, 2018 at 4:18 pm

    InfiniteThanks!!

    Reply
  93. Kate says

    June 18, 2018 at 2:33 am

    Thank you very much! Very grateful!

    Reply
  94. Zeryab says

    September 14, 2018 at 1:28 pm

    Hi Sal,

    I did everything you said and it worked!

    I just have this new problem: there’s now a “secondary sidebar widget” which I can’t get rid off. The visitors of the site luckily can’t see it, however, they will see some space at the websites right side. This space (and the secondary sidebar) appeared after I updated WordPress and after I put the coding under functions.php. Do you perhaps know why this happened and what I can do to fix this?

    Reply
    • Sal Ferrarello says

      September 25, 2018 at 8:53 pm

      Hi Zeryab,

      It sounds like your Genesis Layout Settings got modified. I would check the Default Layout under the Genesis Theme Settings (/wp-admin/admin.php?page=genesis).

      Reply
  95. Bonny C. says

    June 6, 2019 at 1:49 pm

    You’re a lifesaver! Thanks!!

    This worked beautifully for a new client’s old website we couldn’t log into to make changes & run updates.

    Reply
  96. Zuzana says

    July 8, 2019 at 12:33 pm

    Thank you 1000 times, you save me <3

    Reply
  97. Judy says

    June 25, 2020 at 7:27 pm

    Thank you! Just what I needed!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in