Plugin Articole recente in Single.php

Mariuselll

Moderator
Membru personal
Moderator
VIP Club
Salutare. Stiti ceva plugin care sa arate in single.php (postari) ultimele articole adaugate , daca se poate sa se si seteze sa apara ultimele articole din ultimile 24 ore.

Ps: Nu plugin care sa arate in widget.
 

C.Pintiuta

Member
Registered
Full Member
Iti pot face un mic script daca vrei si nu mai trebuie sa instalezi niciun plugin
 

AlexH

Merg pe strada catre Mine...
Membru personal
Administrative
Freelancer
SEO Expert
Am mai postat eu ceva de genul pe forum.
Uite codul care il adaugi unde vrei tu sa apara in pagina. Modifici 5 cu numarul dorit de tine.

Cod:
<ul>
// Define our WP Query Parameters
<?php $the_query = new WP_Query( 'posts_per_page=5' ); ?>
 
// Start our WP Query
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
 
// Display the Post Title with Hyperlink
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
 
// Display the Post Excerpt
<li><?php the_excerpt(__('(more…)')); ?></li>
 
// Repeat the process and reset once it hits the limit
<?php
endwhile;
wp_reset_postdata();
?>
</ul>
 

Mariuselll

Moderator
Membru personal
Moderator
VIP Club
Am mai postat eu ceva de genul pe forum.
Uite codul care il adaugi unde vrei tu sa apara in pagina. Modifici 5 cu numarul dorit de tine.

Cod:
<ul>
// Define our WP Query Parameters
<?php $the_query = new WP_Query( 'posts_per_page=5' ); ?>

// Start our WP Query
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>

// Display the Post Title with Hyperlink
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>

// Display the Post Excerpt
<li><?php the_excerpt(__('(more…)')); ?></li>

// Repeat the process and reset once it hits the limit
<?php
endwhile;
wp_reset_postdata();
?>
</ul>
E bine si asa . Am modificat eu un pic ca nu dadea bine. Multumesc

Cod:
<ul>
<?php $the_query = new WP_Query( 'posts_per_page=20' ); ?>

        <center>    <h3>TITLU</h3> </center>
        <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>

        <center><li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li></center>
<?php
endwhile;
wp_reset_postdata();
?>
</ul>
 

Reclama

Topicuri Recomandate

  1. Platforma CPL Romania

Stiri Monezi Virtuale

Reducere pentru Vacanta

Sunt Invizibil

Loading...
Sus