• Resolved vanillaice

    (@vanillaice)


    I was wondering if there was a place in wordpress to add a custom field for an entire blog, or it’s something I need to add manually in functions or wherever as a variable?

    If I have to add it manually, can anyone tell me how and where a good place for something like that is?

    Example, I’d like to set a few key things like product name and a few other fields, then call it randomly throughout my blog, not just on posts.

    Thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • I think the best way to approach this would be to set something up in functions.php. If you wanted to get real fancy, you could make them into theme options.

    Thread Starter vanillaice

    (@vanillaice)

    Thanks for the reply. I don’t really know how to mess with theme options, so functions may be my best way. Any tips how to do this? ??

    Thanks esmi!

    I think it’s going to depend upon how & where you intend to use these values.

    Thread Starter vanillaice

    (@vanillaice)

    Well basically I’d like to plug in a few values for my blog, and while I can do two with the ‘title’ and ‘description’, I’d like to add a few more. Let’s say it’s a blog about the Boston Bruins:

    Team-name: Bruins
    City: Boston
    Sport: Hockey
    Captain: Zdeno Chara

    This way I can plug those fields in wherever I want.. index page, sidebar, footer, etc. I can edit the sidebar and hardcore in Zdeno Chara, but perhaps I want to make a blog about another hockey team, I don’t want to have to change code on my sidebar, footer, etc every time I make a new blog.

    Hope this makes sense ??

    Given that WP (and I) don’t know one sports team from another, how do you intend to categories these posts? Will you tag or categorise them by team name, city or sport?
    Adding these variables to functions.php is relatively easy. It’s making sure that you get the right values printed on the pages that’s the harder task and takes a little bit of pre-organisation.

    I think you’d need to create dummy custom meta values using add_post_meta() but I’m not sure. I’ve thought about doing this but haven’t actually tried it yet. There may be other ways.

    Thread Starter vanillaice

    (@vanillaice)

    Well I would only add these fields to the blogs that are going to be focused on a specific topic. In my example would only be for a complete Boston Bruins blog, and not a general hockey blog.

    Thread Starter vanillaice

    (@vanillaice)

    I got it, I just used the simple define() option in php ??

    Thanks for your help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Custom field for entire blog’ is closed to new replies.