I’m having the same issue, except editing the flexible contents save, but the admin area doesn’t show my changes. There are missing fields on the edit page, but the fields still exist when configuring them. Very strange.
If you’re connecting to a remote database, you’ll either have to write a custom SQL query or create a new wpdb instance (unsure of the latter).
Can you post more of your code?
Are you running any kind of caching plugin? If so, try clearing the cache.
Otherwise, see: https://wordpress.org/support/topic/update-all-posts-using-php-or-function
Is the select being generated from acf or from your own code? What’s the setup look like? Are there any JS errors in console?
This is not the fault of ACF, but TinyMCE (and a little bit of WP for stripping it down).
See: http://code.tutsplus.com/tutorials/adding-custom-styles-in-wordpress-tinymce-editor–wp-24980
Basically, you’ll need to write your own functions.php filter or install this plugin: http://wordpress.org/extend/plugins/tinymce-advanced/
Filter example:
add_filter( 'tiny_mce_before_init', 'custom_mce_before_init' );
function custom_mce_before_init( $settings ) {
$style_formats = array(
array(
'title' => 'Some Style',
'selector' => 'a',
'classes' => 'my-anchor-class',
)
);
$settings['style_formats'] = json_encode( $style_formats );
return $settings;
}
The last line is not working because it’s commented out. Is that what you’re referring to?
Yes, when editing the field groups, set the location to be more precise.
When editing the field group, try setting the location rules to be more specific.
Make sure your plugin is up-to-date. Disable other or recently installed plugins as well as the JS error may not be caused by ACF.
If you export via TOOLS -> EXPORT -> CONTACT FORMS and then import them via IMPORT -> FROM WORDPRESS, then there shouldn’t be any issues.
However, since ID’s can change between exporting/importing, we’ve always found it easier to copy an entire DB to the new site and just modifying the URL’s via DB Replace tool (see https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ )… this way, ID’s are maintained and nothing breaks.. but this isn’t recommended for existing sites as you’ll lose everything (unless, of course, the dev site is up-to-date already).
If anything, after doing the export/import, you may just have to go back through your pages and reassign your CF7 forms.
`This may be a late response, but for those searching on how to move post meta (which are fields in ACF), you will need to manually edit the database table wp_postmeta. Take note that you should firstly know that you’re editing the database, and that you should probably take a backup prior to making any raw changes.
You will need to know three things prior:
• The OLD post ID
• The NEW post ID
• The fields (post meta) you want to move
In wp_postmeta, you’ll want to run an sql query to see what post meta is available for the OLD post. Simply run this query:
SELECT * FROM wp_postmeta WHERE post_id = 123
Substitute 123 for the actual OLD post id.
From there, you will see a list of post meta currently assigned to the post. Look for your fields that you want to change. To change the post ID to reflect the new post ID, you can either write a query to target certain meta_id’s or select post meta rows individually and then edit them all at once.
A query to target a range of meta id’s could be written such as:
UPDATE wp_postmeta SET post_id = 444 WHERE post_id = 123 AND meta_id > 32
444 would be your NEW post id, 123 would be your OLD post id, and 32 would be the meta_id to test and apply all changes on AFTER. You probably shouldn’t edit the _edit_last
, _edit_lock
, and _wp_page_template
rows… but the others are fair game. However, this really depends on what other plugins/post features are being used… so you’ll have to pay special attention to the meta_key values.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.