• I’m trying to write a class that I can easily drop in to all my future Themes to simply provide an options page. My goal is to have as little code as possible, basically just defining the fields that I want people to fill out.

    This code works for the most part, in that it will show the form correctly.

    The problem is that I can’t save the changes. I don’t know why my sanitize method (which will eventually be the validate method defined on the subclass, but currently is the update method on the abstract class so see if I can see anything happening.

    The code is only half way done, but I figure since update returns the input arguments, it should work minimally

    Any thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I would try changing this:

    echo '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">';

    to this:

    echo '<form method="post" action="options.php">';

    I believe at first glance looking at the github that it’s actually not going to the right place for the settings API to know what to do with it.

    Thread Starter Adam van den Hoven

    (@littlefyr)

    Furmph,

    Thanks. That’s exactly the problem. It was never clear to me that I needed to submit there.

    Thanks!

    Adam

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme Options Page Problems’ is closed to new replies.