Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

How do I show/echo Custom Field in page


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Dec 17, 2011, 12:56 AM
_kimberley's Avatar
_kimberley
 
18 posts · Dec 2011
Amsterdam
How do I show/echo Custom Field in page

I added a New Custom Field called:
name_casino

How do I echo this variable in my page?

I had something like this:
<? echo $bfa_ata['name_casino']; ?>
and this:
<? echo get_post_meta($post->ID, 'name_casino', true) ?>
  #2  
Old Dec 17, 2011, 05:21 AM
juggledad's Avatar
juggledad
 
22,099 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
First you need a plugin like 'exec-php' inorder to have php in the page.
the first example you show is meaningless since the custom field has nothing to do with Atahualpa and '$bfa_ata[...]' is the Bytes For All (the theme) array of variables .

your second try should work.
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support

Last edited by juggledad; Dec 17, 2011 at 05:24 AM.
  #3  
Old Dec 19, 2011, 02:22 AM
_kimberley's Avatar
_kimberley
 
18 posts · Dec 2011
Amsterdam
Oke exec-php is installed, but don't know what you mean after that.

Which code do I must use to echo a custom field?

Last edited by juggledad; Dec 19, 2011 at 03:55 AM.
  #4  
Old Dec 19, 2011, 03:58 AM
juggledad's Avatar
juggledad
 
22,099 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
the PHP function 'echo()' will echo a field - for example
HTML Code:
<?php echo "hello world"; ?>
will echo 'hello world'.

To echo custom fields you need to know how to access them. You should look thru the wordoress codex (http://codex.wordpress.org/) to find a function that and/or instrctions to find the filed.

This has nothing to due with the theme since you are doing it in a post it will apply to all themes.
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support

Bookmarks

Tags
custom field, echo, show

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show custom field in kicker - only IF field value exists jaxon Center area post/pages 13 Feb 6, 2013 01:11 PM
Change Custom Field display in page editor kdawes01 Atahualpa 3 Wordpress theme 2 Sep 4, 2011 09:47 PM
[SOLVED] Use Custom Field image_src to Show Thumbnail in Excerpt Big Geek Daddy Header configuration & styling 8 Mar 6, 2011 05:33 PM
Button with Custom Field Xethon Sidebars & Widgets 0 Sep 17, 2010 04:08 AM
Custom field image with custom field link mbastos Atahualpa 3 Wordpress theme 1 Jul 1, 2010 08:17 AM


All times are GMT -6. The time now is 03:12 AM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.