Putting It All Together: Creating a WordPress Theme Options Page Resources

There are some good theme option tutorials already out there, but I found a lot of them either too elaborate for my needs or incomplete. As a result, I thought I’d break it down how I used various tutorials in order to complete my page.

Loading Your Theme File

To actually load your theme options page, make sure that it is loaded as part of the theme setup. If you’re using an existing theme, you should see a:

add_action( ‘after_setup_theme’, ‘themename_setup’ );
This or something similar tells WordPress to load the themename_setup function more or less as the theme is being loaded/applied. Refer to the function reference page if necessary.

Somewhere in the function that is called, themename_setup, add a line to load your theme options:

require( get_template_directory() . ‘/inc/theme-options.php’ );
Refer to the PHP Manual require page if necessary.

All the code talked about in the tutorials would go in this one file. If a theme-options file already exist, consider whether you would rather make a new one or simply modify the existing one. If you only have 1-2 options, also consider adding options to existing options, such as Writing, Discussion, etc. if appropriate.

Recommended Create a Theme/Plugin Options Page Tutorials

Make your options page: Presscoder’s Tutorial (second half of post) or Otto’s Tutorial (simpler, less to read through, but less complete)

One thing in particular, I preferred Presscoder’s validation code.

The one thing I’ve been having problems with is setting the default options, and some other people I have found also have problems with the register_activation_hook, in which case, try using add_action as explained by Chip Bennett.

At the bottom of Otto’s post, he also briefly explains how to add options on existing pages instead of making a new one.

First half of Presscoder’s post gives a good overview of the WordPress functions and easy copy/paste example code for the various types of form options (e.g. textarea, checkbox).

A full example of an options page can also be found on Presscoder’s post near the bottom (just above “In Summary”).

To get the “Options/Settings Updated” box when a user has submitted/saved their options: Search for “Settings Updated Notice” on page 3 of Chip Bennett’s tutorial.

Displaying Your Options

Obviously, this depends on what kind of options you had (textbox, checkbox, etc.). The simplest example is if you have a textbox or textarea and you want to simply output the user’s input. In the appropriate place, insert:

<?php $array_name = get_option(‘option_name’); echo $array_name[‘key’]; ?>
Refer to get_option function reference if necessary.

More Resources

Chip Bennett obviously wrote much more than what I just refer to, but it goes into much more complex options than I cared to and covers how to implement multiple tabs on one settings page. If you’re interested in more functionality, I definitely recommend his tutorial.

If you prefer to have a prebuilt helper, Olly Benson has created a sort of template or framework with reusable code. Read more on his blog (though I haven’t actually tried using it).

For more, the WordPress Settings API page has a list of tutorials.

Ryerson Faculty Conference: Students’ View on Academic Social Media Use Panel

Some notes from the panel, which consisted of three presenters/moderators and a group of 5 students.

Some Statistics on Technology Use Among RU Students

  • 42% smartphone users used their devices for academics
  • 78% own smartphone
  • 20% integrated seamlessly into classroom environment
  • 50% institution uses technology effective
  • 39% institution needs more technology

Above averages over all students in survey (except the last, which is below).

What Social Media Do You Use for Class Work?

The theme seemed to be convenience in many comments:

  • Use Facebook for IM + file exchange
  • always there, goes straight to smartphone
  • In FB, easy to separate people into groups
  • use Google Apps for docs, calendar, etc.
  • Twitter more convenient than email
  • email is the easiest way to submit assignments

Why do you prefer Social Media outlets instead of the CMS?

  • doesn’t crash
  • user friendly
  • more real world
  • connect outside of classroom
  • inconsistent look and functions e.g. discussion not always enabled
  • habit – already using Twitter/FB before entering university

What Changes Would You Like To See?

  • more consistent use of CMS
  • possible integration into social media
  • possible notifications (though some consider it to just add to the “noise”)
  • automated audio/video capture to be posted for later reference

Faculty also expressed concerns not only on the time commitment needed in an attempt to engage students with different social media outlets, but also privacy. Students, however, said they were more likely to use the CMS if it was more user friendly, had more options, more consistently used, and most importantly, that expectations were clearly outlined.

Ryerson Faculty Conference Keynote #2: Getting Students Engaged

Presenter: Dr. Arne Kislenko

Everyone does things differently and there is a huge subjective component to teaching. What’s presented is also not necessarily based on theories of teaching, but based on overarching principles garnered from experience.

1. Enjoy the Teaching

Teaching is the greatest job in the world. This is the most important place to start, that students understand that you like your job, that they see your enthusiasm. Faculty can actually influence people’s lives, which is a great honour. However, some teachers don’t show up, cut classes, lecture right from a textbook, substitute with technology, which does not allow the development of a personal connection. You need to be there, students need to want to come to class.

It’s worrisome that many universities seem to be diminishing the role of teaching by putting the pursuit of research above all else. However, teaching reinforces research and through teaching we actually communicate with our students.

2. The Active Citizen

We have to teaching from the perspective that students in our classrooms are trying to become citizens in the full sense of the word. We should teach research, writing, critical thinking, objective analysis, to care and take an active role in the world. We should impart some broad consideration of the world.

If someone is apathetic about everything, they are a lost cause. Students should see their education as more than 3-4 years here with a job at the end. They should graduate with a sense of ability to think critically, engage in analysis, direct thoughts about search, and care a little bit about the world, especially since they want to work in this world.

Not only do students need to be engaged, they need to be made engaging with a broad perspective, not just the classes they take. They should be questioned about how they are going to move forward in the working world.

Many students though feel unchallenged and many instructors are fine with them just getting by.

3. High Standards

Respect them as adults with responsibilities and obligations instead of coddling them as children. Have high standards, communicate that to students, and they may aspire to them.

Aside. Draw Connections

We should leave students guessing what we think, and we should welcome them as participants and journeymen.

4. Extracurricular Activities

Be prepared to deliver to our students more than just in the classroom. e.g. alternative spring break – overseas working with NGOs, international discussions

This is the best way to enrich the educational experience, and increase personal growth for students.

Ryerson Faculty Conference Keynote: Can Statistics Help Us Understand Student Engagement?

Presenter

  • Christopher Evans

National Survey of Student Engagement

While statistics don’t tell the whole story, it shows student perceptions, which are important because those are passed onto other current students and prospective students.

  • 1st + 4th year students, 4200+ at this university
  • from 146 countries

Commute

  • live with parents 69%
  • commute to campus 95%
  • >10 hrs/week commuting 38%

Student Employment

  • on campus 13.6%
  • off 54.7%
  • work 68.3%
  • work >10 hrs/week 45.3%

Campus Life

  • participate co-curricular 40%
  • attend campus events < 50%
  • < 10 hr/week (outside of class) 68%

Academic Life

  • significant time studying 79%
  • prepare >10hr/week for class 61%
  • unprepared for class 35%

Satisfaction with Education

  • good/excellent 79%
  • would attend again 81%
  • faculty available/helpful/sympathetic 66%
  • faculty make students aware of research activities by applying their research to teaching 62%

This last point is valuable experience for students and gives a little window to faculty life, which allows students to get to know faculty a little better.

Sense of Community

  • in class 56% – faculty crucial to student’s feeling at home at Ryerson
  • academic program 46%
  • study groups 29%
  • none 12% – realistically, no matter what, some students won’t feel at home, will never be zero

Contributions to Engagement

  • presentation 39%
  • project that integrated ideas from different sources 86%
  • worked with other student during class 46%
  • worked with classmates outside of class 70%
  • discussed ideas with faculty outside class 56%
  • received prompt written/oral feedback 50%

All instructors feel that they give prompt feedback, but perception might be skewed somewhat. For example, an instructor might return a quiz the next class, but when midterms are returned a week later, students may think faculty are being lazy. Faculty activities become important for student perception of engagement as well.

  • participated in community based project 34%
  • practicum/intership/co-op/etc 30%
  • worked with faculty members on activities other than coursework 38%
  • capstone/thesis/senior project (4th only) 23%
  • worked on research project with faculty member outside of program requirements 8% – skewed to lower side, because includes 1st and 4th year students

Obstacles

  • work/financial 83%
  • family
  • health/disability

What would Improve Learning Experience

These were very generic answers.

  • quality of instruction 34%
  • increase contact 21%
  • improve quality of academic support 24%
  • more opportunities to undertake research with faculty 25%
  • reduce class size 13% – large classes aren’t a big deal, but the subject matter and how it is presented

Teaching Chairs Report – Faculty Concerns

  • most common presentation forms: lecture, seminar/method course, lab/studio
  • motivating students 89%
  • evaluating students’ learning 65%
  • understanding learning differences 53%
  • understanding how students develop intellectually 59%
Faculty Express Concern About
  • students attitudes and behaviour – class attendance, participation
  • administrative and logistical challenges – scheduling, large class sizes

Faculty feel large class sizes are a problem, but students don’t.

What does the data tell us about engagement?

NSSE data gives us hints about academic and social interaction

  • academic integration: perception of faculty interest, academic resources, academic preparation
  • social integration: student’s perception of his/her ties to the post-secondary institution, which include extend to which student is involved in institution-related activities, perception of faculty and staff attitude, institutional sensitivity, institution events

Some faculty portray a kind of remote veneer that keeps them at arm’s length, which makes them unapproachable.

The data tells the what, but not the how or why, and only about student perception.

Levels of Engagement

While the NSSE focus on two types of levels of engagement, the data doesn’t give us much insight into any of the others.

  • mentoring – highlevel, multi-variant interaction (NSSE focus)
  • personal
  • functional interaction – contact for particular, institutional purposes (NSSE focus)
  • incidental
  • disengagement

Benefits of Increasing Faculty Student Engagement

  • higher grades
  • improved student confidence
  • increases student perception of being valued
  • increases persistence in higher education

Faculty may find it a bit of a balancing act for sure, but asking about a student concern at the time may help to save time later, should situation grow worse.

How to Increase Engagement

One slice does not fit all – some suggestions will not be for you.

  • provide opportunities for students to write = dialogue
  • attend student events, esp those at are purposeful (e.g. student colloquium)
  • encourage students to attend offices hours, and keep encouraging
  • have projects that encourage collaboration and continued feedback
  • pay close attention to student interactions – if socailly isolated, struggling
  • have faculty model their methods of engaging students to each other – some faculty members are known to be oustanding teachers and have the skills with engaging students, we can learn from them

The Downsides of a CMS in Keeping Up: WordPress & HTML5

As a web developer, I cringe at deprecated code and try my best to keep up to date, which right now means familiarizing myself with HTML5 and CSS3. In reflecting on how best to update our website, I realized that with a CMS, naturally some things are out of my control.

Giving Up Control & Relying on Developers

Whether it’s the core or plugins, users of a CMS are reliant on its developers to keep things up to date. Is that lost of control worth the benefits? Generally, I would say yes, but that doesn’t stop me from wishing that the technology that we use to adopt new specifications.

WordPress & HTML5

Image Tags & Properties

I think it’s interesting that in HTML5 there is now the figure and figcaption elements. If they are taken advantage of, I think it definitely helps to parse information in a webpage and to identify text that is directly related to images.

One thing that does bother me about WordPress (which actually has noting to do with HTML5) is that it forces users to have a title, and leaves alt text blank by default. I don’t know what the best solution may be, but I would propose to insert the title text into the alt text by default and then allowing the user to change it. If they want to leave it blank, then there should be a checkbox to mark it “intentionally left blank” or something. Perhaps this could be an admin option, but I would definitely want something like that since I would really like to force our users to have alt text, but I don’t want to touch the WP core obviously.

Text Formatting Tags

It’s a bit of a minor thing and while some may argue the usefulness of the different semantic tags, users of the rich text editor would have no notion that they’re using <strong> instead of <b> or <em> instead of <i>. While I admit that even I struggle on the appropriate use of each (I have to look it up every time I think about it), if we want to see widespread adoption, then we need to get users to think about their writing and what they intend to do when using any of strong, em, b, i.

Tables

While we avoid tables and it should never be used for layouts, users will still want to insert tables to display data without resorting to an image. I’ve always wondered that WordPress doesn’t have a table insertion button even under the kitchen sink. What worries me is that then users who have a basic knowledge of HTML will insert it themselves using the HTML view with improperly formed code.

Layout & Forms

You might wonder why I’d lump the two, and that’s because, other than (using the default) comment form, both of these are dependent on a WordPress setup.

Forms will generally depend on the plugin. Similarly, whether the layout is in HTML5 is very dependent on the theme, along with many elements of accessibility.

Unfortunately, while HTML5 themes are relatively easy to find, most form plugins do not tell you whether they are using HTML5 or how much of it.

Why Not Adopt HTML5

I do realize that while there are a number of advantages to HTML5, especially in terms of structure,  it’s still in development. Working in an educational institution, it’s also more work and sometimes difficult in some cases to ensure backwards compatibility.

In particular, screen readers do not necessarily support all the new HTML5 elements and will frequently ignore whole chunks of text or have difficulty with reading links, etc. Even the newest versions of screen readers do not necessarily recognize elements and properties designed to make webpages easier for screen readers to interpret.

I would like to think that since WordPress talks about trying to be accessible that anything in the WordPress core will be updated once there is widespread adoption not only among browsers, but also screen readers. Obviously, adoption will take time though. For example, many form input types have been adopted by most browsers, but has not been adopted by IE at all (will be in IE10).

One can only hope that adoption will pick up once various part of the HTML5 specifications are ‘cemented.’