• Rozwiązano bonson

    (@bonson)


    Mam Kod

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	<div class="products">
    		<section class="subject">
    			<header>
    				<a href="#products"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    			</header>
    
    					<?php if ( has_post_thumbnail()) : ?>
    
    					<?php the_post_thumbnail(); ?>
    
    					<?php endif; ?>
    
    			<article>
    
    				<?php the_content('',FALSE,''); ?>
    
    			</article>
    			<button type="submit" class="buttonpro">More...</button>
    		</section>
    
    	<?php endwhile; else: ?>
    	<div class="brak"><p>Brak Wpisów</p></div>
    	<?php endif; ?>	
    
    	</div><!-- End: products -->

    Własny przycisk read more umieszczamy pomiędzy () w <?php the_content(); ?> a jak zrobić aby buton był w innym konkretnym miejscu (w moim przypadku poza article – o stałej pozycji)? Powielenie content powiela jednocześnie tekst a pomijając article nic sie nie pokazuje.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hej,

    Proponuje wstawić w pętli linka z wordpressowym the_permalink() w środku, tak jak w przypadku linku w Twoim headerze. Przykład:

    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?> - Przeczytaj cały artykuł" class="read-more">czytaj dalej</a>

    Thread Starter bonson

    (@bonson)

    Faktycznie dobry pomysł 🙂 działa tak jak planowałem!.
    Dzięki malyo!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Temat ‘Przycisk "read more"’ jest zamknięty na nowe odpowiedzi.