Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Php

Name: OP 2011-07-23 19:05

Could someone tell me an alrenate way of doing this code?

<?php previous_post_link_plus( array(
'order_by' => 'post_title',
'loop' => true,
'max_length' => 30,
'tooltip' => 'Previous post',
'in_same_cat' => true,
) );?> |
<?php next_post_link_plus( array(
'order_by' => 'post_title',
'loop' => true,
'max_length' => 30,
'tooltip' => 'Next post',
'in_same_cat' => true,
) );?>


The problem is wordpress always takes the first > from the => as a close tag forphp for  reasons I cannot fathom. Thanks.

Name: Anonymous 2011-07-23 19:42

the alternate way involves using the [code] tags

Name: BBCode Fairy 2011-07-23 20:20

<?php previous_post_link_plus( array(
    'order_by' => 'post_title',
    'loop' => true,
    'max_length' => 30,
    'tooltip' => 'Previous post',
    'in_same_cat' => true,
) );?> |
<?php next_post_link_plus( array(
    'order_by' => 'post_title',
    'loop' => true,
    'max_length' => 30,
    'tooltip' => 'Next post',
    'in_same_cat' => true,
) );?>

Name: Anonymous 2011-07-23 21:55

>>1
The problem is wordpress

Name: Anonymous 2011-07-23 22:42


<?php

$opts = array(
    "order_by",
    "loop",
    "max_length",
    "in_same_cat",
    "tooltip",
);

$prev = array(
    "post_title",
    true,
    30,
    true,
    "Previous post",
);

$next = array(
    "post_title",
    true,
    30,
    true,
    "Next post",
);

previous_post_link_plus( array_combine( $opts, $prev ) );
echo "|";
next_post_link_plus( array_combine( $opts, $next ) );

?>

Don't change these.
Name: Email:
Entire Thread Thread List