1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

WP add costum fields where i want ?

Discussion in 'Content Management' started by obeegoone, Jan 17, 2011.

  1. #1
    Hi i run a wordpress blogg and wanted to add so my costum fields appear on a different place on a costume there.

    I use arras theme (http://www.arrastheme.com/) and want to add costum fields where it says Text

    http://img816.imageshack.us/img816/6885/namnlsq.png

    But have no idea how todo that, i asked in their forum but guess they dont know or the support is bad :(

    Hope someone can help thanks
     
    obeegoone, Jan 17, 2011 IP
  2. kiramanic

    kiramanic Peon

    Messages:
    205
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can display custom fields wherever you want by adding a small bit of code in the appropriate place.

    So first of all you need to find the file that outputs the post page, I'm unfamiliar with the specific theme but it's probably single.php or index.php.

    Once you've found the right place, use the template tag get_post_meta to actually display the content of the field.

    For example if your custom field in admin is named "price" you'd use

    echo get_post_meta($post->ID, 'price', true);
    PHP:
    in the theme file where you want it to show up :)
     
    kiramanic, Jan 17, 2011 IP
  3. obeegoone

    obeegoone Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks that should help alot,altought it seems that i cant find the place where i want to put it haha
     
    obeegoone, Jan 17, 2011 IP
  4. kiramanic

    kiramanic Peon

    Messages:
    205
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Do what I do....when in doubt just write random words at various points in the file and see where they appear on the page...helps you get an idea of what's what :D

    Most unprofessional advice ever!
     
    kiramanic, Jan 17, 2011 IP
  5. obeegoone

    obeegoone Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Nah srly that advice was greate :D Altought i have hard time finding wich file its in :p Guess i have to try each haha. Not index or single :(

    Thanks for your help :)
     
    obeegoone, Jan 17, 2011 IP