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 Fields Cannot be Deleted


  #1  
Old Jul 15, 2009, 02:00 PM
elenniel
 
3 posts · Jul 2009
I was trying to display custom fields in the footer of my posts with %meta% and then all of a sudden I had a bunch of custom fields that I didn't create myself and that I just cannot seem to get rid of.
If I delete them, when I update the post they just come right back. When I try a new post, they automatically appear.

The automatic custom fields I get are:-
  • bfa_ata_meta_title
  • bfa_ata_meta_keywords
  • bfa_ata_body_title_multi
  • bfa_ata_display_body_title
  • bfa_ata_body_title
  • bfa_ata_meta_description

If I have a "Listening to" field or a "Reading" field then those will appear, but alongside all the bfa_ata_ fields which I don't want.

Here's a cropped screenshot of what I see on a post.

The bfa_ata_ custom fields don't appear for the posts I made before I started using Atahualpa, but only for those I made after it, which is quite recently.
(There's only one exception and I've no idea why that one in particular seems fine whereas the others aaall have the extra custom fields displayed.)

I've been at this for hours already and I still can't seem to find a solution. Help, anyone?
  #2  
Old Jul 15, 2009, 09:01 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
These are the new post/page options, see the other box higher up on the page right below the write panel "Atahualpa post options".

The post info item %meta% became kinda useless through that, I had not thought about that. I'll put something in to exclude those when %meta% is used.

For now, can you use %meta('fieldname')% instead?
  #3  
Old Jul 16, 2009, 04:22 AM
elenniel
 
3 posts · Jul 2009
Quote:
Originally Posted by Flynn
For now, can you use %meta('fieldname')% instead?
If I do that, two things happen:
(1) If the post has no fields assigned to it, I get an error message in the footer where I inserted the meta, presumably because the bfa_ata_ fields are still automatically assigned to the post somehow, although they're blank.
Again, this only happens for recent posts. Posts prior to my switch to Atahualpa are fine. :/

The error message says:
Warning: implode() [function.implode]: Bad arguments. in C:\Inetpub\vhosts\elvenstar.net\subdomains\ind\htt pdocs\wp-content\themes\atahualpa\functions\bfa_postinfo.ph p on line 16


(2) I can only use it for one custom field key - say, for example %meta('feeling')%
If I try and add more (I used to use about three or four at most - "Feeling", "Listening to", "Readi ng" and "Watching"), then I get the same error message in the footer alongside the "Feeling" meta, about bfa_postinfo.php

So... yes. It's very perplexing to me. :/
  #4  
Old Jul 16, 2009, 03:47 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
For %meta('fieldname')% try this: Replace in functions/postinfo.php, line 12-18, this
PHP Code:
// Callback function for post meta replacement
function meta_values($matches) {
    
$meta_key $matches[1];
    
// "get_post_custom_values" returns an array. Turn it into a string, separated by commata
    
$meta_values implode(", "get_post_custom_values($meta_key));
    return 
$meta_values;

with this:

PHP Code:
// Callback function for post meta replacement
function meta_value($matches) {
    global 
$post;
    return 
get_post_meta($post->ID$matches[1], true);

For %meta%, starting at line 559 in postinfo.php, you can add the red part to remove the bfa_ata... keys & values

/* The meta = ALL custom fields:values, formatted by Wordpress as
unordered list <ul><li>..</li><li>..</li></ul> */
if ( strpos($postinfo_string,'%meta%') !== FALSE ) {
ob_start();
the_meta();
$the_meta = ob_get_contents();
ob_end_clean();
$the_meta = preg_replace("/<li>(.*)bfa_ata(.*)<\/li>/i", "", $the_meta);
$postinfo = str_replace("%meta%", $the_meta, $postinfo);
}

Last edited by Flynn; Jul 16, 2009 at 03:58 PM.
  #5  
Old Jul 17, 2009, 04:27 AM
elenniel
 
3 posts · Jul 2009
Wonderful! Problem solved. :D (Well, the bfa_ata_ options still appear in the custom fields list if I go back to edit the post, but since they don't appear on the post itself, I'm fine with that :] )
Thanks so much, Flynn!
  #6  
Old Aug 29, 2009, 05:23 PM
sendilnathan
 
2 posts · Aug 2009
I am having rows and rows of Custom Fields I never entered. If I delete one, I only get more. This is really weird. I have another page where I have over 50 custom fields all self-generated from the Atahualpa Page Options where I put values into the 4 rows.

I deleted the values in the Atahualpa Page Options' 4 rows and all I have is 50 blank custom fields with values on the left hand side for custom fields such as bfa_ata_body_title_saved, bfa_ata_body_title, bfa_ata_meta_description... and several blank on both right & left custom fields.

Also, every time I save the page I get more of these custom fields that are growing indiscriminately.

btw, all of this is in Manage>>Pages.

I am using Atahualpa 3.4.1 and WordPress version 2.6.2
Attached Thumbnails
Click image for larger version

Name:	customfields1.jpg
Views:	3259
Size:	62.2 KB
ID:	234  Click image for larger version

Name:	customfields2.jpg
Views:	3236
Size:	56.0 KB
ID:	235  
  #7  
Old Aug 31, 2009, 09:00 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
I suggest to update to 3.4.2, Atahualpa is still evolving fast and I need to focus on the current and next versions

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom post fields wwday3 Post-Kicker, -Byline & -Footer 8 Jul 28, 2009 12:39 PM
[SOLVED] Display Custom Fields and Values Under Post Heading grasshopper Atahualpa 3 Wordpress theme 4 Jul 2, 2009 01:40 PM
[SOLVED] Extra spaces in comments fields rabbitpoets Comments, trackbacks & pings 2 Jun 29, 2009 09:10 PM
Color of registration form fields paulae Atahualpa 3 Wordpress theme 2 Apr 5, 2009 04:00 PM
help- newbie and i just deleted /bfa_hor_pages.php mkrivera7 Atahualpa 3 Wordpress theme 1 Mar 21, 2009 03:39 AM


All times are GMT -6. The time now is 10:22 AM.


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