Creating a Simple Admin Page

function nbcore_options() { echo '<div class="wrap">' ;

<p>Get the latest Notes Blog and Notes Blog Core news from <a href="http://notesblog. com" title="Notes Blog">http://notesblog.com</a> - it\'s that sweet!</p>

Here, you basically just store the nbcore_options() function with the page you want to output in the admin interface. By putting a containing div with the 'wrap' class around it all, you get the WordPress admin interface look, so you probably want to be doing that. The three echo statements are simple enough; it is all normal HTML code, with backslashes in front of single quotation marks to avoid it breaking the echo string. Nothing fancy, it is just a placeholder theme options page after all.

Here is the full code:

130^

function nbcore_menu() {

add_theme_page('Notes Blog Core', 'Notes Blog Core', 8, 'your-unique-identifier', 'nbcore_

function nbcore_options() { echo '<div class="wrap">'; echo '

<p>This is a placeholder for upcoming admin options for the Notes Blog Core theme. These things aren\'t due yet, in fact, they are pretty far away, so just forget about this page for now huh?</p>

<p>Get the latest Notes Blog and Notes Blog Core news from <a href="http://notesblog.com" title="Notes Blog">http://notesblog.com</a> - it\'s that sweet!</p>

Want to save stuff and add cool functionality? We'll dig deeper into that in the following chapters, dealing with WordPress plugin development. That's basically where you're at when you've gotten this far: you're doing a WordPress plugin, but in your theme's functions.php file.

Was this article helpful?

0 0
7 Days to Profitable Blogging

7 Days to Profitable Blogging

Learn The Simple Blueprint To Successfully Starting a Profitable Blog In Just 7 Days? MOST blogs fail because their owners start out badly, and continue to make mistakes. By the time they realize what's gone wrong, they would be quicker restarting!

Get My Free Ebook


Post a comment