Problem:
Using HTML codes in the custom checkboxes field value
Example of such checkbox:
Title: Library
Value to store: Library *
(i choose 'display the value of this field from the database') (Ffxt1HFfWKrCkbNb being the shortcode of the specific popup)
when editing the profile backend, checking some checkboxes, those with that href code are being saved as checked and appear on frontend, but after saving/loading the profile in backend, those checkboxes turn to be 'unchecked'. So, the next time i'll save that profile, those previously checked boxes will become unchecked and that content won't be seen in frontend any longer.
In other words: it doesn't stay checked after saving. The boxes without that code are fine.
Solution:
It is not recommended to use HTML codes in the "Value to store" of custom checkboxes field, I suggest you store only the simple value in the field "Value to store", enable option "Show one of these two values", move those HTML link codes into the field "Selected", see screenshot: checkboxes-link.JPG https://d7j863fr5jhrr.cloudfront.net/wp-content/uploads/2017/08/560188-checkboxes_link.JPG Relevant Documentation:
Problem:
Each Product Post is Compatible (Custom Post Type-CPT) with Various Models (CPT) of Manufacturer (CPT) equipment.
Each Model has one Manufacturer
Each Model is used for one purpose of Product Type。
In the custom search form, the filter should have limited options. Meaning that once you select a Product Type, Manufacturers should only be listed if they have a Model that is qualified as that type of equipment.
Solution:
Yes, it is possible, you will need to create another new post type "product type", setup it as parent post type of:
a) Compatibilities
b) Products
That will be able to make those three dropdown menus work.
And there is a workaround, you can add a custom taxonomy "product type" into post type "Compatibilities", edit each "Compatibilities" post, setup the term of each "Compatibilities" post, then you will be able to setup the taxonomy "product type" filter in your view
Problem: The single_zoom parameter on my map View does not seem to be working.
Solution: In this case, the problem is that more than one result appears at the same exact location on this map, so the "single_zoom" setting never applies. It only applies when just one result is found, and it does not account for identical locations. So the other option here is to set a global maximum zoom level for this map.
Problem: I have a CRED form that allows users to clone a post by clicking the "Submit" button. This works, but I want the post's URL to change. I want the URL to be the same as the original post, but I want to append "-" and the post ID at the end.
Solution: Use the cred_save_data hook to modify the post after it's created. Tweak the slug, update the post, and copy any postmeta over into the duplicated post.
add_action('cred_save_data_22086', 'duplicate_post', 10, 2);
function duplicate_post($post_id, $form_data) {
// get data of original post
$post = get_post( $_POST['wpcf-container_id'] );
$orig_slug = $post->post_name;
$orig_id = $post->ID;
$pos = strpos( $orig_slug, '-' . $orig_id);
if ( $pos > -1 ) {
// the -ID is part of the slug, so we need to get rid of that
$orig_slug = substr( $orig_slug, 0, $pos);
}
$new_slug = $orig_slug . '-' . $post_id;
// update the new post ID and slug
$post->ID = $post_id;
$post->post_name = $new_slug;
wp_update_post( $post );
// get fields of original post
$fields = get_post_custom( $_POST['wpcf-container_id'] );
// update the new post with these fields
foreach ($fields as $key => $values) {
foreach ($values as $value) {
add_post_meta($post_id, $key, $value, false);
}
}
}
Problem:
wysiwyg post fields not showing format in page using a layout template Solution:
Old page was broken, re-create the new page and this will resolve the issue. Relevant Documentation: