1

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?

2 Answers 2

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

maybe

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

is it what are you looking for?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.