Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

Custom field template tag


 
Prev Previous Post   Next Post Next
  #1  
Old Nov 5, 2012, 04:46 AM
ripz7
 
6 posts · Nov 2012
Options Custom field template tag

Hi,

I have found the template_tags.php include file and I am trying to add a custom template tag that will display custom field data for each post.

Here is what I have for a test:

Code:
function bfa_post_link() {
	$id = get_the_ID();
	
	echo 'This is the current post ID: '.$id;
}
I want to use this in a sub-template, however when I insert my custom template tag ( bfa_post_link(); ), it doesn't display anything. Do I need to declare this function in another file somewhere so it loads with the rest or something similar?

Ps: Is there any other easier way of displaying custom field data for each post in Montezuma's virtual template system?

Any help or advice is much appreciated.

Thanks
 

Bookmarks

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 02:11 PM
Custom field template - show on posts.. uffehs Atahualpa 3 Wordpress theme 5 Apr 6, 2012 04:31 PM
Using a custom field within an excerpt... or trying to arthurmild Excerpts, Read more, Pagination 4 Jan 5, 2011 05:40 AM
Button with Custom Field Xethon Sidebars & Widgets 0 Sep 17, 2010 05:08 AM
Custom field image with custom field link mbastos Atahualpa 3 Wordpress theme 1 Jul 1, 2010 09:17 AM


All times are GMT -6. The time now is 06:37 PM.


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