• Answers to this code problem are welcome. 

    Line  88: <nav class=’primary-menu-wrapper’ aria-label='<?php echo esc_attr_x( ‘Horizontal’, ‘menu’, ‘Theme name ); ?>’>

    I received a warning that a translation function has an incorrect number of arguments in the file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • If that’s a direct copy-and-paste, then your problem is with the ‘s that you use. Look at the code…

    <nav class=’primary-menu-wrapper’ aria-label='<?php echo esc_attr_x( ‘Horizontal’, ‘menu’, ‘Theme name ); ?>’>

    Can you see where the closing ‘ is for Theme name? It’s after your closing ?> tag, so that’s very far out of place. Set that back to where it’s meant to be and you should see it work.

    • This reply was modified 10 months, 2 weeks ago by catacaustic.
    Moderator bcworkz

    (@bcworkz)

    ‘Theme name ); ?>’>
    The last quote is OK where it is, it closes the aria-label attribute value. But Theme name is still missing its closing quote. Add it so the parser can “see” the right number of args.

    This topic is using the wrong quote character for coding use (curly instead of straight). Your original source code may be correct, the forum’s parser automatically makes curly quotes if the text is not within a code block.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme development’ is closed to new replies.