Custom Field Data Not Being Captured
-
Awesome plugin, first of all.
I’ve added a custom field (Source URL) and it shows up in the widget, but the value is not added to the post, unless you edit the post and enter the URL, there.
Any ideas?
-
I have the same problem. I have added custom fields in back-end and they appear on the page when I want to create a new post from front-end, but they do not appear after post is published…
http://jessheimtorg.no/registrer-ny-bedrift
Hope this is fixable as this is a GREAT plugin!!
br,
FiGu
Could it be possible that there is some misunderstanding?
The only thing the plugin does, is showing existing custom fields in the widget so users can fill in these fields while posting.
There is no functionality to show the custom fields in the post. Of course I can’t predict where to show these fields in the post (in the top, bottom, anywhere else).
If you check the post in the dashboard and the custom fields have the values you just filled in, the widget catches the values right.
There are some posts to show custom fields in posts: http://wordpress.org/support/topic/show-custom-fields-on-posts
Perhaps there are also plugins to accomplish this.
BTW, if you find any, please post them here.Hope this helps.
inapan
Perhaps there are also plugins to accomplish this.
BTW, if you find any, please post them here.@inapan
I was looking at this the other day, there is a plugin where you can use a shortcode for a custom field, it is about three years since it was updated, it would not be hard to add shortcode code to your plugin [‘quick-post’ ‘field name’].I have been working on something similar and have just done a quick search and found this plugin you can create snippets and insert the short codes.
Regards
David
I had a quick play, and added a small function to functions.php
/* Start Custom Field Shortcode [custom-field 'field name'] */ function raindrops_get_custom_field($atts){ if ( !isset($atts[0]) || !$atts[0] ) return ""; if( !is_singular() ) return ""; $key = $atts[0]; global $post; $value = get_post_meta( $post->ID, $key, true ); return stripslashes( $value); } add_shortcode('custom-field', 'raindrops_get_custom_field'); add_filter('raindrops_get_custom_field', 'do_shortcode');Created a page added a custom field called ‘test’ with a value and in the body [custom-field test] and the value was shown.
I still cannot see where you would use it though, unless you had some sort of template?
HTH
David
Hi Inapan and thanks for your reply!
Yes, I guess I misunderstood how this widget works…
I have managed to add the custom fields in the “widget-page” in front end, but like I wrote I cannot make the custom fields appear in my posts. I thought they would appear automatically, but I realize that is not the case…:-)
I read the post and I found the part about
<?php $key="REPLACE W/KEY NAME"; echo get_post_meta($post->ID, $key, true); ?>But as a noob I don’t know where to add this code… Should it go in one of my theme pages?
My site http://jessheimtorg.no will be for local businesses to register with info like address, phone nr, web site URL etc.
That’s why this plugin appear to be so great for me, as business owners can register at my site and publish info (a post) about their business on their own from front end. The custom fields I added is for address, phone etc.
But my problem is that I don’t know how to make these files appear…Is someone could point me in the right direction, I could investigate some more on my own…
Br,
FiGuPerhaps I found a way to display custom field values in posts made by the Quick Post Widget.
I installed the plugin “Get Custom Field Values”. With template tags, but also with shortcodes, you can show custom field values in posts. I used the shortcodes.
The Quick Post Widget lets you define text to be placed at the bottom or the top of each post made by the widget. You can define text and html but also shortcodes. In the ‘Bottom of content’ field in the Quick Post Widget’s admin panel I put this text:
[custom_field field="mail" this_post="1" before="Mail: " /]I defined a custom field ‘mail’ and made it show up in the Quick Post Widget.
So now when I make a post with the Quick Post Widget I can enter a value for the ‘mail’ custom field while posting. The result of the custom field and the shotcode wich I defined in the ‘Bottom of content’ field will be that the mail-address shows up at the bottom of each post made by the Quick Post Widget.
I tested it and it works well.
If you have troubles implementing this, feel free to mail me.
inapan
The topic ‘Custom Field Data Not Being Captured’ is closed to new replies.