• I have developed a template that includes a small, right column of text.

    Currently, this text is embedded directly in to the markup. Is it possible to add an additional tag to WordPress to include this text via the database and introduce a field in the admin panel of WordPress where I can update the text in this field?

    Maybe WordPress already has this function built in and I’m not seeing it, or there is a plugin out there somewhere.

    I did consider using the “Web site description” tag because I’m not using a description anywhere on the site, but unfortunately that tag doesn’t allow for HTML to be included within it (I’ll need this, as there are several paragraphs of text and parts need to be bold etc).

    Thanks in advance!

    Jamie

Viewing 9 replies - 1 through 9 (of 9 total)
  • You can include the website description with <?php bloginfo('description'); ?>.

    Thread Starter jamieharrop

    (@jamieharrop)

    Yes, I know how to include the Web site description, Zoutesnor. ?? As you’ll see from my post, I included the Web site description but it didn’t allow me to include HTML (It just outputted HTML tags as raw HTML).

    Thanks!

    Jamie

    Ah, I misunderstood. Sorry bout that :D.

    Maybe use an extra file in your template, and include it with <?php require_once(TEMPLATEPATH . '/description.php'); ?>?

    You could always use custom fields but they are specific to an individual post and I’m not sure if that will help you since you didn’t say whether what you’re trying to output is global of post-specific.

    Thread Starter jamieharrop

    (@jamieharrop)

    Thanks Zoutesnor. An include would work, but then how would I display a form field in the admin panel to allow the user to update it? Or would that appear in the “Presentation” tab if I give it read/write permissions?

    Thanks, also, pizdin. Yes, what I’m wanting to do is global, so custom post fields won’t work.

    Jamie

    Yes, it would appear in the presentation tab, just go to the theme editor. You could also write a plugin to automate all of this, but I think that would be a lot of work to establish something that can be done relativily easy.

    Thread Starter jamieharrop

    (@jamieharrop)

    Unfortunately, the theme editor doesn’t do as I need either. It is half way there, but it involves having to input the HTML tags such as
    and <p> rather than having them parse automatically like they do when you write a new post, for example. The people who are going to be using this have no HTML experience.

    I thought this would be a relatively common request from WordPress users. I guess not. ??

    Thanks for your help so far.

    Jamie

    “I thought this would be a relatively common request from WordPress users. I guess not. :-(“

    Yes, you’re right the second time: it’s not. You’re either gonna have to write a plugin or a hack of some type. Personally, I’d suggest you do it with a plugin.

    You could also add a category wich is excluded in your template files, and add a second loop to your sidebar, wich would show just one post. That solves it all I think, and it would be done easyer than to create a plugin.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Adding New Field’ is closed to new replies.