Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Metabox Array

<?php

$args = array(
    'post_type' => array( 'photo' )
);
// The Query
$the_query = new WP_Query( $args );
 
// The Loop
if ( $the_query->have_posts() ) {
    echo '<ul>';
    while ( $the_query->have_posts() ) {
        $the_query->the_post();
        echo '<li>' . get_the_title() . '</li>';
        $images = rwmb_meta( 'my_field_id', ['size' => 'thumbnail'], get_the_ID() ); ?>
        <h3>Uploaded images</h3>
        <ul>
            <?php foreach ( $images as $image ) : ?>
                <li><img src="<?= $image['url']; ?>"></li>
            <?php endforeach ?>
        </ul>
        <?php
    }
    echo '</ul>';
} else {
    // no posts found
}
/* Restore original Post Data */
wp_reset_postdata();
Comment

PREVIOUS NEXT
Code Example
Php :: query builder laravel getmedia undefined method 
Php :: This behaviour is (currently) not supported by Doctrine 2 
Php :: how to concatenate folder name with image in php 
Php :: mkdir recursive php 
Php :: laravel collection median 
Php :: laravel | eloquent | db | randomly fetch | query data 
Php :: desactivar estilos globales wordpress 5.9 
Php :: installer composer dans ionos 
Php :: andebol 
Php :: how to get php code from website 
Php :: textarea autocomplete phpmyadmin style 
Php :: HTTP Authentication example forcing a new name/password 
Php :: Jaygaah Free Shipping Woocommerce 
Php :: require and include difference in laravel 
Php :: user input in oop php 
Php :: compare strings alphabetically php 
Php :: date selct option php 
Php :: php browser detection script 
Php :: how to get many of quensation php programming language 
Php :: carbon in laravel documentation 
Php :: copy(/Users/admin/Library/Caches/composer/files/fakerphp/faker 
Php :: what is WP_USE_THEMES 
Php :: how to set selected value in dropdown using php 
Php :: Round Number Up 
Php :: php questions in tasks 
Php :: php get epoch timestamp of date 
Php :: shop manager Redirect @ WooCommerce 
Php :: laravel 8 app with more than one database 
Php :: get product price with thousands separator 
Php :: disable laravel cors 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =