Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter quomodo

    (@quomodo)

    link.kebo.io

    Thread Starter quomodo

    (@quomodo)

    impossible?

    Thread Starter quomodo

    (@quomodo)

    But now I got title up to for example iframe youtube ?? … eh … learning is always hard ??

    Yes, there will be many problems with that kind solution … better to use thumbnail and fallback image if there isn’t any .

    Thread Starter quomodo

    (@quomodo)

    ok You give good logic earlier – I think I get it …

    <?php if( has_post_thumbnail() ) : ?>
    			<figure class="post-thumbnail">
    				<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_post_thumbnail(); ?></a>
    			</figure>
    
    			<?php else : ?>
    			<figure class="post-thumbnail">
    				<a href="<?php the_permalink(); ?>" rel="bookmark"><img src='<?php echo catch_that_image() ;?>'></a>
    			</figure>
    
    			<?php endif; ?>
    
    			<h2 class='entry-title'>
    				<a href='<?php the_permalink(); ?>' title='<?php the_title_attribute(); ?>' rel='bookmark'>
    					<?php the_title(); ?>
    				</a>
    			</h2>
    <?php
    
    	$content = get_the_content();
            $content = preg_replace("/<img[^>]+\>/i", "", $content);
    	$content = apply_filters('the_content', $content);
    	$content = str_replace(']]>', ']]>', $content);
    	echo $content;
    
    ?>

    Thanks for Your time ??

    Thread Starter quomodo

    (@quomodo)

    This doesn’t change anything – the_content() will also put image if there is any and $thumbnail will put image … so I will have two images …

    Is there a particular reason – Yes, I want to have image on top, then title and then text … ??

    When somebody won’t set thumbnail (forget, do not know about it) but put image in post – I want to display it like : first image -> title -> text.

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