Seren-IT
Seren-IT

Reputation: 13

combine/merge two php functions

I need to combine/merge two php functions, but I can't get the syntax right.

The first one (WordPress function) displays a link, with the text 'Next CD in Category', to the next post in my category:

<?php next_post_link('%link', 'Next CD in Category', TRUE) ?>

The second one is used to display the link text in my site's different languages:

<?php echo SPEC($GLOBALS['_LANG']['Next CD in Category']) ?>

How do I combine these so that the 'Next CD in Category' link to uses the language function to display the link in different languages?

Upvotes: 1

Views: 420

Answers (2)

genesis
genesis

Reputation: 50976

maybe

<?php next_post_link('%link', SPEC($GLOBALS['_LANG']['Next CD in Category']), TRUE) ?>

is it what are you looking for?

Upvotes: 2

Kaken Bok
Kaken Bok

Reputation: 3395

<?php
    next_post_link(
        '%link',
        SPEC($GLOBALS['_LANG']['Next CD in Category']),
        TRUE
    );
?>

Upvotes: 3

Related Questions