WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom Fields won't add correctly - Theme problem (5 posts)

  1. mdiehr
    Member
    Posted 5 years ago #

    Hello, I am working on a custom theme for the site http://goodgamery.com/wordpress/.

    I made a change yesterday that somehow broke the "Add Custom Field" button when writing a new post. If I switch back to the default theme, that button works again. I can't remember what I was editing at the time, since I had made a bunch of changes and only noticed the broken button a couple hours later.

    Has anyone had this happen before? I need help tracking down where exactly in my theme I managed to break things.

    Thanks.

  2. mdiehr
    Member
    Posted 5 years ago #

    Ok, I found the problem after I remembered that functions.php has to be completely free of blank lines.

    I had one blank line near the bottom of that file and after I removed it, the custom fields button worked again.

  3. mepstein
    Member
    Posted 5 years ago #

    you are a lifesaver!

    Blank lines in the functions.php file was causing all sorts of buggy actions in the admin section, like when I would try to add a custom field to a post/page, the flash of yellow and the field actually getting added to the list wasn't happening, but if I would refresh the page, it would then show the field as being added.

    Guess I got lucky with the google search tonight...

  4. Jamfris
    Member
    Posted 4 years ago #

    Another one who got lucky with its search.

    I left some blank fields (because the theme of my blog is quite complex), but corrected all the double or triple balnk spaces into one, and worked perfectly!

  5. chizet
    Member
    Posted 4 years ago #

    Yep, helped here too. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic