HELP! Custom URL image (2 posts)

  1. efromm
    Posted 1 year ago #

    I purchased a Theme that has a custom section where it suppose that I must just upload images of my clients and the theme does the rest: ( it's very easy to add client, just go to 'Clients--> Add New'. Just type the URL and upload your client logo)

    The point is that where I upload an image doesn't show and when I look into the console I can see how doesnt exist any reference to a image link. <img src="" alt="client 1">

    The client section has a .php code:

    <!-- OUR CLIENTS -->
    	<div class="container clearfix">
    		<div class="sixteen columns m-bot-20">
    			<ul class="our-clients-container clearfix">
                        $count = 1;
            		    $type = 'client';
            		    'post_type' => $type,
                        'posts_per_page' => -1
            		    query_posts($args);	?>	
    					<?php if (have_posts()) : while (have_posts()) : the_post();
    						$clienturl = get_post_meta($post->ID, 'iweb_client_link', TRUE);
    						$thumb_w = '188';
    						$thumb_h = '80';
    						$client_img = rwmb_meta( 'iweb_client_img', 'type=plupload_image' );
    						foreach ( $client_img as $image )
    							$client_img = $image['full_url'];
    							$client_img = aq_resize($client_img, $thumb_w, $thumb_h, true);
    				<li class="">
    					<a href="<?php echo $clienturl; ?>">
    						<div class="bw-wrapper">
    							<img src="<?php echo $client_img; ?>" alt="<?php the_title(); ?>" />
    				<?php endwhile; ?>
    			<?php endif; wp_reset_query(); ?>

    maybe some master can help me to edit something so I can upload image and set up the file url. Would be perfect if I can use my stored images in cloud, like AWS S3 service.

    Thanks in advance

  2. bcworkz
    Posted 1 year ago #

    If your commercial theme is not working properly, you should consult with the theme's customer support. That would be expected service as part of what you paid for. We can't help you much because we cannot access the code and you publishing the code violates the theme's copyright.

    The theme stores image data in the postmeta table. The rwmb_meta() theme function extracts this data and returns an array of image info arrays. For some reason apparently either the 'full_url' data is missing or the aq_resize() theme function is not returning the correct value. That's all anyone other than the theme developers could tell you.

    A really dirty hack to display images, assuming the data is missing and aq_resize() actually works, is to replace the first 4 lines of the loop ( after <?php if (have_posts()) ://...) with an assignment to $client_img a hardcoded array of image info arrays normally returned by rwmb_meta(). Something like:

    $client_img = array(
       array('full_url' => 'http://example.com/path/image1.jpg',),
       array('full_url' => 'http://example.com/path/image2.jpg',),

    Since you are entering URLs in the theme's admin page (or hardcoding as above), I would expect entering a cloud URL would result in images stored there being displayed. I can't say for sure being unfamiliar with the theme.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.