Nu merge nici asaPai iti apare title="" pentru ca ai pus gresit ghilimele!
Trebuie pus asa:
$string = "<a href=' ".get_permalink($post->ID)." ' title=' ".$previous." '>' ".$previous;
ca idee am modificat iar:
dar nu e ce vreau eu adica titlu postuluiCod PHP:$string = "<a href='".get_permalink($post->ID)."' title='".get_permalink($post->ID)."'>".$previous;
Ultima modificare făcută de florin; 14th September 2006 la 16:45.
te duci in wp-includes/template-functions-links.php si dai scroll pana la aproximativ linia 336, unde gasesti functia previous_post(), care ar trebui sa arate asa:
o inlocuiesti cu:Cod PHP:function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
if ( empty($in_same_cat) || 'no' == $in_same_cat )
$in_same_cat = false;
else
$in_same_cat = true;
$post = get_previous_post($in_same_cat, $excluded_categories);
if ( !$post )
return;
$string = '<a href="'.get_permalink($post->ID).'">'.$previous;
if ( 'yes' == $title )
$string .= apply_filters('the_title', $post->post_title, $post);
$string .= '</a>';
$format = str_replace('%', $string, $format);
echo $format;
}
sub ea esteCod PHP:function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
if ( empty($in_same_cat) || 'no' == $in_same_cat )
$in_same_cat = false;
else
$in_same_cat = true;
$post = get_previous_post($in_same_cat, $excluded_categories);
if ( !$post )
return;
$my_title = apply_filters('the_title', $post->post_title, $post);
$string = '<a href="'.get_permalink($post->ID).'" title="'.$my_title.'">'.$previous;
if ( 'yes' == $title )
$string .= apply_filters('the_title', $post->post_title, $post);
$string .= '</a>';
$format = str_replace('%', $string, $format);
echo $format;
}
pe care o inlocuiesti cu:Cod PHP:function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
if ( empty($in_same_cat) || 'no' == $in_same_cat )
$in_same_cat = false;
else
$in_same_cat = true;
$post = get_next_post($in_same_cat, $excluded_categories);
if ( !$post )
return;
$my_title = apply_filters('the_title', $post->post_title, $nextpost);
$string = '<a href="'.get_permalink($post->ID).'">'.$next;
if ( 'yes' == $title )
$string .= apply_filters('the_title', $post->post_title, $nextpost);
$string .= '</a>';
$format = str_replace('%', $string, $format);
echo $format;
}
la mine a mers pe un k2, asa ca ar trebui sa mearga si la tine la fel. spor si astept sa-mi spui daca s-a rezolvat.Cod PHP:function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
if ( empty($in_same_cat) || 'no' == $in_same_cat )
$in_same_cat = false;
else
$in_same_cat = true;
$post = get_next_post($in_same_cat, $excluded_categories);
if ( !$post )
return;
$my_title = apply_filters('the_title', $post->post_title, $nextpost);
$string = '<a href="'.get_permalink($post->ID).'" title="'.$my_title.'">'.$next;
if ( 'yes' == $title )
$string .= apply_filters('the_title', $post->post_title, $nextpost);
$string .= '</a>';
$format = str_replace('%', $string, $format);
echo $format;
}
Momentan este/sunt 1 utilizator(i) care navighează în acest subiect. (0 membrii și 1 vizitatori)