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
    );
?>
Sign up to request clarification or add additional context in comments.

Comments

2

maybe

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

is it what are you looking for?

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.