I have a question regarding the CustomFields section in Wordpress when adding a new post. I have a plugin that adds a meta_box to the edit/new page of a post. Inside this meta_box, I have a button that, when pressed, uses an AJAX call to update/add custom field values to the new post.
This all works fine, however the custom field section is, logically, not updated to reflect this newly added value. I want to refresh the custom field section of the edit page for this new post to update/reload to reflect the current values..
Does anyone know if and how this should be done in Wordpress?
TIA,
John
Related
I am very new to WordPress and I am trying to edit a registration form by adding more fields. When I add a new text field, the product field no longer displays the product and price and just shows the default. I didn't make the website I just need to edit this, I am using the Gravity Forms plugin.
This is the form before editing:
And after adding a new field the product field ( in green writing) reverts to default values:
I can't figure out what makes it change so if you have come across this problem before or have any advice please let me know. Thanks!
I'd bet there is some custom code at play here is that is dependent on the field ID. When you change the field, it has a new ID, and the custom code isn't being applied. I'd suggest doing a full theme/plugin conflict (start with your theme) to see where that custom code resides:
https://docs.gravityforms.com/testing-for-a-themeplugin-conflict/
I am managing an existing site, with working ACF - there are several field groups set up, one of which is for Team Members- We want to add an additional field to the custom fields for Team Members for an alternate image.
I have set the new image field up - as shown in this screenshot:
But when I attempt to add/edit a new team member, the new fields do not appear in the editor - as shown in this screenshot:
Does anyone have any idea why this could be happening? I have disabled other plugins and reactivated them, I have updated to the latest ACF also, nothing seems to make the new fields appear in the editors.
ACF settings can actually be overwritten by code added to the functions.php file using a combination of built in filters for ACF such as acf_load_listing_type_source and acf_add_local_field_group.
Anyone running into this issue should confirm that this is not the case. It happened to me as I am editing a client's website and I did not actually create the theme, so was unaware of the code overriding the ACF settings.
I would like to add a simple _custom_field to buddypress activity updates so that when you post a buddypress activity update there is an additional input field where I enter text, whenever that update is displayed in the activity stream, the update template should display the _custom_field aswell
This did it, You have to modify the activity post form to add the new input field then you create a function in bp-custom.php/functions.php to post that new value to the database, this will only work after modifying the javascript that processes the form, the following link gives a clear walk through
https://buddypress.org/support/topic/adding-a-second-element-for-posting-with-an-activity/
I need to create a new page which will have same functionality of one the page of admin.
I have a page which is accessed by /wp-admin/post-new.php?post_type=shop_order.
I have made a copy of this page by the name "new-post0.php" but when I access new cloned page , its content is different!
I m missing something at registering this new page?
You shouldn't copy and paste Wordpress core files. That's called "hacking the core" which is very very bad.
http://websynthesis.com/dont-hack-wordpress-core/
You should instead develop your "new-post" page as a new custom post type.
You can learn about them here:
http://codex.wordpress.org/Post_Types
The link /wp-admin/post-new.php?post_type=shop_order you posted refers to a new post page for a custom post type.
To get another page like that, you'll need to create another custom post type and add the custom meta fields.
If you can't code it, there are plugins that you can use to achieve the same results.
Custom Post Type UI to create custom post types and ACF for custom fields. Right now, you should download ACF from Github.
When adding a new post the custom fields from a previous post are showing as meta data for the new post. Is there some way to clear these fields when a new post is being created or is there possibly an issue with my installation?
I think this is a list of available custom fields if you talking about custom fields list in the select box below post editor, otherwise it's impossible that other fields were copied from previous post without any plugin interaction.