Accessing Custom Fields on Pages

Sometimes WordPress is criticized treating everything as a post. The matter of fact is, post type pages, post type post – both are actually Post in database. So no post will collide with any page ID. 🙂 So simply a get_post_meta() is enough. But if you still want something specific to Pages, you can use: … Read more

Using WP Color Picker in Repeatable Fields

It’s hard to know for sure, since you don’t include the markup you’re output for the metabox nor the JS you’re using to clone. But, the following simplified setup seems to work for me: metabox markup <label for=”my_field”> My Color Picker Field </label> <input name=”my_field” id=’my_field’ type=”text” class=”my-colorpicker” /> <a href=”#” class=”clone-it”>Add Another Color Picker</a> … Read more

ul list with only as many li’s as filled custom fields

You could add a check to only display the item if it exists: <?php if ( $imagen4 ) { ?> <li class=”artiq-slidder-item”> <img src=”https://wordpress.stackexchange.com/questions/269610/<?php echo $imagen4[“url’] ?>”></li> <?php } ?> But it looks like you are using the Advanced Custom Fields plugin. If this is the case, you would probably be better off using a … Read more