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
The Accidental Blogging Millionaires

The Accidental Blogging Millionaires

Get Inspired By The Most Popular Bloggers Online! If You Want To Skyrocket Your Success With Business And Improve Your Overall Life You Need To Have A Look At The Accidental Blogging Millionaires! Business can be a fight, particularly when you’re trying to establish one online and like all fights, to succeed you must find the winning techniques and apply them.

Get My Free Ebook


Post a comment