Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

Custom post fields


  #1  
Old Jan 28, 2009, 07:27 PM
wwday3
 
3 posts · Jan 2009
I am setting up a network of aggregator blogs using the FeedWordpress plugin. All of the feed and publisher information that FWP provides is stored in the custom post fields.

Is there a way - using your template "tags" - to extract that custom field information? For instance, what I'd like to do is display a byline something like

Posted by Joe from XYZ blog on January 15, 2009

Normally, to do this, I would just code the FWP template fields inside the index.php or single.php files. I suppose I could do this with your templates as well, but I'd hate to break one and later have my modifications overwritten.

So, can I access the custom fields somehow?
  #2  
Old Jan 29, 2009, 05:39 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The theme is not prepared to display custom fields. You would have to put the code to retrieve the custom field value somewhere into the theme files. I.e. into bfa_postinfo.php,

somewhere before

PHP Code:
$postinfo $postinfo_string
code like this:

PHP Code:
$from_xyz_blog PHP_CODE TO RETRIEVE THE CUSTOM FIELD VALUE
and somewhere below

PHP Code:
$postinfo $postinfo_string
code like this:

PHP Code:
$postinfo str_replace("%from-xyz-blog%"$from_xyz_blog$postinfo); 

Then you would be able to use %from-xyz-blog% as a postinfo tag at Atahualpa Theme Options -> Post / Page Info Items
  #3  
Old Jan 29, 2009, 03:00 PM
Ashjoielee
 
17 posts · Jan 2009
NC
I was just about to ask about Custom Fields and saw this thread. I'm not good at php coding, so I want to be sure I'm getting this-

I'm wanting to use the Custom Fields in my sidebar to have this:
Listening to:
Reading:
Event:
(Etc.-I have a list of 5 things)

Can I do this?

Thanks,
Ash
  #4  
Old Jan 29, 2009, 03:05 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Looks like this widget can do that http://wordpress.org/extend/plugins/...-field-widget/
  #5  
Old Jan 29, 2009, 03:43 PM
Ashjoielee
 
17 posts · Jan 2009
NC
Thanks Flynn,
I couldn't get that plugin to unzip
I have the 'More Fields' plugin and see the custom fields boxes at the bottom of the write/edit page in site admin.
But the directions say coding needs to be added and I'm not sure where to add it.
http://codex.wordpress.org/Using_Custom_Fields
  #6  
Old Jan 29, 2009, 06:58 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Quote:
Originally Posted by Ashjoielee
I was just about to ask about Custom Fields and saw this thread. I'm not good at php coding, so I want to be sure I'm getting this-

I'm wanting to use the Custom Fields in my sidebar to have this:
Listening to:
Reading:
Event:
(Etc.-I have a list of 5 things)

Can I do this?

Thanks,
Ash
And that content is going to stay the same throughout the whole site? Because then I don't see why you'd use custom fields at all. Custom fields are supposed to add certain individual content to each post.
  #7  
Old Mar 20, 2009, 11:48 AM
ciolo
 
12 posts · Mar 2009
i also installed custom fields template, and i modded the bfa_postinfo.php:

Quote:
$infoplus = the_meta();
$postinfo = $postinfo_string;
$postinfo = str_replace("%infoplus%", $infoplus, $postinfo);
This will display the meta info under the title and above de footer (twice) but i want to make a div and put it to float-right in the post and display the info there like this: http://img26.imageshack.us/img26/4982/postwidget.png. Can anyone help ? Thanks.
  #8  
Old Jul 27, 2009, 07:02 PM
daniel3ub
 
26 posts · Jul 2009
Quote:
Originally Posted by wwday3
Is there a way - using your template "tags" - to extract that custom field information? For instance, what I'd like to do is display a byline something like

Posted by Joe from XYZ blog on January 15, 2009
You can use the %meta% post info item. Your byline should be something like that:

Code:
Posted by %author-posts-link% from <a href="%meta('syndication_source_uri')%">%meta('syndication_source')%</a> on %date('d#/m#/y')%
I am using it.
  #9  
Old Jul 28, 2009, 12:39 PM
daniel3ub
 
26 posts · Jul 2009
So, I am using the solution above BUT it does not work with posts that are not syndicated, giving me the
Code:
Warning: implode() [function.implode]: Bad arguments. in /var/www/wordpress/wp-content/themes/atahualpa/functions/bfa_postinfo.php on line 16
Any way to avoid this? Is there a way to filter some of the post info according to the category, maybe?

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Fields Cannot be Deleted elenniel Post-Kicker, -Byline & -Footer 6 Aug 31, 2009 09:00 AM
[SOLVED] Display Custom Fields and Values Under Post Heading grasshopper Atahualpa 3 Wordpress theme 4 Jul 2, 2009 01:40 PM
Spaces in the fields of "Post comments" form Lucker Comments, trackbacks & pings 1 May 25, 2009 01:38 PM
Creating custom post template paulae Atahualpa 3 Wordpress theme 3 Mar 18, 2009 11:36 AM
Plugin Conflict w. Custom Post Background strangelove Plugins & Atahualpa 0 Mar 11, 2009 06:25 PM


All times are GMT -6. The time now is 02:52 PM.


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