• Hello,

    I am developing my own WordPress theme using the WordPress API. As part of this theme I want create option pages so that one could adjust certain elements from the theme from within the backend interface.

    What the WordPress API does (please correct me if I am wrong) is that it creates a standard HTML table in which it displays form elements and text.

    Please mind you I am still a noob (a fast learning one though) in the WordPress theme development so some ideas I will post might sound silly or not logic. Please correct me in this case.

    Some option page that I’ve created to set a featured article.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I agree the code does not look nice but that is something that will be fixed in the short future.

    The result of this code is that WordPress returns a HTML table with in there the form elements, a button, etc. I would like to apply either some styles on rows or cells with CSS but neither rows nor cells have a class or ID applied so to do what I want I need to fix the API output, which is what I don’t want.

    Option number two is to design the complete HTML and PHP code with hooks myself. I could do that but why does the WordPress API exist?

    My question is, how can I create a template option page (e.g. without tables, with classes, etc.) that has the look and feel that I want but while using the WordPress API. JQuery comes to mind, but I can’t find any good tutorials connected to WordPress option pages and JQuery.

    Thank you very much for your time and effort. I am looking forward to hearing from you.

    Best regards,

    Marc Witteveen

The topic ‘How to style template option page while using WordPress API’ is closed to new replies.