Bootstrap 4 Carosuel with ACF Repeater field

Did you check the Advanced Custom Fields documentation? You can check how the repeater fields work here: https://www.advancedcustomfields.com/resources/repeater/ You’ll see that you can do the following to show your ACF repeater images on the front-end: if ( have_rows(‘carousel_repeater’) ) : while ( have_rows(‘carousel_repeater’) ) : the_row(); $yourImage = get_sub_field(‘carosuel_image’); if ( $yourImage ) : echo … Read more

how can i update my postmeta without losing old data?

The saving logic should be like this <?php global $post; $get_my_meta = get_post_meta($post->ID, ‘my_meta’, true); $post_meta_name = get_post_meta($post->ID, ‘name-en’,true); $meta = [ ‘name’ => $post_meta_name, ‘chap’ => $season[‘quality_serie’] ]; $updatemeta = [ $get_my_meta, $meta ]; add_post_meta($post->ID, ‘my_meta’, $meta, true); ?> And the loop logic should be like this <?php $first_link = get_post_meta($post->ID, ‘my_meta’); if ($first_link) … Read more

add role on WordPress in PHP on a second database

I managed to solve after several attempts using the following code: // Insert the role $role = array(‘gold_role’ => 1); $serialized_role = serialize($role); $DB_MEMBERSHIP->insert(‘wpvm_usermeta’, array(‘user_id’ => $user_id, ‘meta_key’ => ‘wpvm_capabilities’, ‘meta_value’ => $serialized_role)); It works very well and doesn’t slow down the shopping experience.