Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • So many thanks @lavir !

    Thread Starter giammo

    (@giammo)

    Hi Joe,
    Thanks for your fast reply.

    Yes, I want columns to be full-width on mobile.
    I followed your advice: i have add the .col-12 class (and remove the .col-sm-12) and now work great!

    I’m very gratefull for your work.
    Thanks a lot.

    Best Regard.
    Gian Marco

    Thread Starter giammo

    (@giammo)

    The error was just the use of the_content() function, using get_the_content() function does not expand shortcodes.

    Now work perfectly.

    Thanks very much for making me reflect on the error. 🙂

    Thread Starter giammo

    (@giammo)

    Firstly, thanks for the answer.
    This problem happens exactly into single.php.

    The code is this:

    <?php
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    	echo '<h2 class="post-title page-header text-capitalize">'.get_the_title().'</h2>';
    	echo'<p class="meta">';
    		echo '<span class="author"><a href="'.get_author_posts_url(get_the_author_id()).'">'.get_the_author().'</a></span>';
    		echo ' | <span class="date">'.get_the_date('d-m-Y').'</span>';
    		echo ' | <span class="categories">'.get_the_category_list(' - ').'</span>';
    	echo '</p>';
    	$src = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full', false );
    	if(!empty($src)) {
    		echo '<img class="thumb thumbnail img-responsive" src="'.$src[0].'" alt="immagine '.esc_attr($title).'">';
    	}
    	echo '<p class="desc">'.get_the_content().'</p>';
    		
    	echo '</div>';
    	
    	endwhile;
    else:
    	echo "Post not found.";
    endif;
    ?>

    Certainly I made a mistake in the code (as I said I am a beginner).

Viewing 4 replies - 1 through 4 (of 4 total)