Support » Theme: Travelify » Warning: sprintf(): Too few arguments

  • Hi,
    I ran into this error which seems to be wide spread with Travelify (just do a Google search):

    Warning: sprintf(): Too few arguments in public_html/wp-content/themes/travelify/library/functions/functions.php on line 436

    While looking into the code I found that the syntax seems to have an error in lin 436. The command sprintf() according to my knowledge requires as the first parameter a formating string which is currently missing.

    So instead of
    $byline = sprintf('<span class="author vcard"> which causes the php warning I use this code: $byline = sprintf("%s",'<span class="author vcard"> in line 436.

    Maybe that helps also other people solve the issue and can be added in the next update.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @belgarath,

    I hope you are well today and thank you for your question.

    I have tested it on my test site using latest version of Travelify theme but didn’t get any warning message even setting WP debug to true.

    Which version of theme are you using?

    This can be due to plugin conflict on your site so please try temporary deactivating all plugins and see whether everything works fine and then enable the plugins one by one to see which plugin is conflicting if any.

    See in the following topic it was due to plugin conflict.

    Best regards,
    Vinod Dalvi

    Thread Starter Belgarath


    Hi Vinod,

    thanks for your response. I run the latest theme version 3.0.4 and had already disabled all plugins but still got the warning message. With the solution above the warning disappears.

    If you look at the sprint() syntax here: you see that the ‘format’ parameter is mentioned as ‘required’.

    Anyway, my problem is solved – I just thought it would be a good idea to add the fix with the next theme update as several websites using the Travelify theme can be found on Google displaying that error message.

    Thank you for notifying us about the issue.

    The issue doesn’t occur on my test site so may be it occurs only with specific condition therefore i have notified this to the theme developer so that it will be resolved in the future version of theme.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning: sprintf(): Too few arguments’ is closed to new replies.