Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134302

freelibrty on "I have a problem that needs professional"

$
0
0

I have a problem in the presentation of additional images with outstanding image
In short, the problem that in the event of a picture of it works without any problem
But in the absence of a photo showing I have a problem, namely, (additional image)

rning: error_log() has been disabled for security reasons in /public_html/wp-includes/wp-db.php on line 1036

File that has the problem

<?php get_header(); ?>
<?php get_sidebar(); ?>
<div class="main">
	<?php if (have_posts()) :while (have_posts()) : the_post(); ?>
	<div class="block">
    	<div class="head">
        	<div class="right"></div>
            <div class="left"></div>
            <div class="title"><?php the_title(); ?>

&nbsp;<font color="#232428"> -   <?php $code = get_post_meta(get_the_ID(),'swt_code',true);echo $code;?> </font>

</div>
		</div>
        <div class="in">
			<div class="post-img"><a href="<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );echo $url; ?>" rel="lightbox[roadtrip]"><img src="<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );echo $url; ?>" /></a></div>
            <div class="extra-img">
            	<ul>
                    <?php global $wpdb;
					$images = get_post_meta( get_the_ID(), 'swt_plupload', false );
                    $images = implode( ',' , $images );
                    // Re-arrange images with 'menu_order'
                    $images = $wpdb->get_col( "
                    SELECT ID FROM {$wpdb->posts}
                    WHERE post_type = 'attachment'
                    AND ID in ({$images})
                    ORDER BY menu_order ASC
                    " );
					foreach ( $images as $att )
                    {
                    // Get image's source based on size, can be 'thumbnail', 'medium', 'large', 'full' or registed post thumbnails sizes
                    $src = wp_get_attachment_image_src( $att, 'full' );
                    $src = $src[0];
                    // Show image
					echo "<li><a href='{$src}' rel='lightbox[roadtrip]'><img src='{$src}' /></a></li>";}?>
				</ul>
            </div>
			<?php the_content(''); ?>
        </div>
	</div>

    <?php comments_template( '', true ); ?>
    <?php endwhile;endif;?>

</div>
<?php get_footer(); ?>

Section that contains a problem with the file is

<div class="extra-img">
            	<ul>
                    <?php global $wpdb;
					$images = get_post_meta( get_the_ID(), 'swt_plupload', false );
                    $images = implode( ',' , $images );
                    // Re-arrange images with 'menu_order'
                    $images = $wpdb->get_col( "
                    SELECT ID FROM {$wpdb->posts}
                    WHERE post_type = 'attachment'
                    AND ID in ({$images})
                    ORDER BY menu_order ASC
                    " );
					foreach ( $images as $att )
                    {
                    // Get image's source based on size, can be 'thumbnail', 'medium', 'large', 'full' or registed post thumbnails sizes
                    $src = wp_get_attachment_image_src( $att, 'full' );
                    $src = $src[0];
                    // Show image
					echo "<li><a href='{$src}' rel='lightbox[roadtrip]'><img src='{$src}' /></a></li>";}?>
				</ul>
            </div>

And has deleted operate without a problem


Viewing all articles
Browse latest Browse all 134302

Trending Articles