Ibara updated 5 December 2020 kwa 3 h 58 me

 

Ibara Navigation katika WorPress 2 vifungo.
Edit WordPress kwa urambazaji bora kati ya makala yako.

mfano wa kwanza chini desous kutenganisha yetu WordPress Fomu menyu ya maelekezo.
Editing kazi juu ya single.php au template-single.php (kulingana na mandhari waliochaguliwa hii hutofautiana Configuration).

<div align="left" class="boutonleft"><?php previous_post_link( '%link', '&larr; %title'); ?></div>
<div align="right" class="boutonright"><?php next_post_link( '%link', '%title &rarr;'); ?></div>

 

Na sasa tazama jinsi ya kuunganisha herufi maalum (HTML chombo) katika makala WordPress yetu menyu ya maelekezo.
Ibara ya awali:

<?php $prevPost = get_previous_post(false);
if($prevPost) {
$args = array(
'posts_per_page' => 1,
'include' => $prevPost->ID
);echo "\t" . '<a rel="prev" href="' . get_permalink($prev_post->ID) . '" title="' . $prev_title. '" class="previous-post"><h4><span class="icone">&larr;</span>PREVIOUS POST</h4></a>' . "\n";
$prevPost = get_posts($args);
foreach ($prevPost as $post) {
setup_postdata($post);
?>
<?php
wp_reset_postdata();
} //end foreach
} // end if
?>

 

 

makala inayofuata:

<?php $nextPost = get_next_post(false);
if($nextPost) {
$args = array(
'posts_per_page' => 1,
'include' => $nextPost->ID
);echo "\t" . '<a rel="next" href="' . get_permalink($next_post->ID) . '" title="' . $next_title. '" class="next-post"><h4>NEXT POST<span class="icone">&rarr;</span></h4></a>' . "\n";
$nextPost = get_posts($args);
foreach ($nextPost as $post) {
setup_postdata($post);
?>
<?php
wp_reset_postdata();
} //end foreach
} // end if
?>


0
0.0 rating
0 / 5 nyota (0 mtazamo)
Mufti0%
Vizuri sana0%
Wastani0%
Maskini0%
kutisha0%

kufuta

 

Kiwango cha makala hii

kuondoka na Jibu

Anwani yako si kuchapishwa. Mashamba required ni alama *