Is using eval() ok in this scenario

I see what you’re trying to do … and I don’t like it at all. You’re including way too much in terms of options for the theme, particularly if you’re allowing freeform PHP code on an options screen.

Why this is a bad idea

The mantra of the entire WordPress project is “decisions, not options.” Fact is, the more options you have for a theme, the more confusing it can be to manage things. If you really need to have that much customization available, build a parent theme and have people build custom child themes on top of that.

Think Genesis or Thesis. Very powerful themes, with a wide variety of design options available via customized child themes.

If you insist, here’s what you can do instead

You say you want to give users the option to queue up display blocks in the site without editing the theme files directly:

In my theme options I have an editor element (extended textarea) I use for a few features so code can be added into the theme from the theme options without the user needing to open the theme files.

This sounds exactly like another system that already exists within WordPress: widgets.

A widget is just a pre-defined content template that you can drag-and-drop anywhere on a widgetized surface within WordPress. Some people have just one sidebar that can house widgets. Others have several widgetized regions in their themes (I’ve seen at least one with 70 different widget-ready locations!).

It seems like you already have your content blocks defined (the template parts). I recommend you do one of two things:

  1. Have the users edit the files directly. You’re already having them write PHP on your options panel. It’s not a huge step for them to edit the PHP directly.
  2. Widgetize your theme. These don’t have to be typical WordPress widgets … but your custom template-parts are predefined blocks of content similar to the way widgets are. Don’t reinvent the wheel. If you want people to position them in different locations, give them an interface to do so.

jQuery makes it really easy to drag and drop items from one region to another. Then you can save the sequencing in the options table and call things directly … without using eval().