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

Get post content from another section in custom single page

Multiple loops in the same page <?php // this is for customer posts $args = array( ‘post_type’ => ‘customer’ ); $the_query = new WP_Query( $args ); ?> <?php if ($the_query->have_posts()) : ?> <?php while ($the_query->have_posts()) : $the_query->the_post(); ?> <?php // loop here the_title(); the_content(); ?> <?php endwhile; wp_reset_postdata(); else : ?> <p><?php _e( ‘Sorry, no … Read more

What is the best way to build home pages with a lot of sections for distributable themes [closed]

Due to historical context implementation of static front pages in WordPress is, simply put, a horror. This is not something it was meant to do originally and the way it was bolted on at a certain point is opposite of smooth. Under these constraints it would be hard to impossible to say what would be … Read more

Add custom column for custom field

I adjusted the code for you. You can directly use the code in functions.php file. Here is more reference that can help you to understand more. Link 1 Link 2 // Adding Custom Column add_filter(‘manage_stfic_posts_columns’, ‘ST4_columns_head_only_stfic’, 10); add_action(‘manage_stfic_posts_custom_column’, ‘ST4_columns_content_only_stfic’, 10, 2); // CREATE TWO FUNCTIONS TO HANDLE THE COLUMN function ST4_columns_head_only_stfic($defaults) { $defaults[‘bookcode’] = ‘Book … Read more