WordPress.org

Ready to get started?Download WordPress

Forums

Poloray
[resolved] Warning: _() expects exactly 1 parameter, 2 given in (13 posts)

  1. Vadim V
    Member
    Posted 1 year ago #

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You'll have to contact InkThemes for help. It's a commercial theme - and not supported here.

  3. Charles Frees-Melvin
    Member
    Posted 1 year ago #

    It's a warning that is new in 3.5. It is because of poor coding. http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/

  4. Jesper Johansen (jayjdk)
    Member
    Posted 1 year ago #

    Charles, it doesn't have anything to do with that.

    It's because the theme author misses a underscore/e in the function name on this line:

    <li class="posted_by"><?php _( 'By', 'poloray' ); ?>&nbsp;&nbsp; <?php the_author_posts_link(); ?></li>

    It should be __() or _e() not _().

    Quite strange how the theme author nor the reviews haven't noticed that.

  5. Charles Frees-Melvin
    Member
    Posted 1 year ago #

    Yes your right. I thought it was the prepare issue without looking at the function.

  6. InkThemes.com
    Member
    Theme Author

    Posted 1 year ago #

    Thanks for listing the issue. I am submitting the update for this issue.

    Thanks
    Neeraj

  7. InkThemes.com
    Member
    Theme Author

    Posted 1 year ago #

    Update:
    I have submitted the update for this. I am marking this topic as resolved.

    Thanks
    Neeraj

  8. Vadim V
    Member
    Posted 1 year ago #

    Theme Author is already possible to download?
    http://wordpress.org/extend/themes/poloray
    Download Version 1.0.0 ?

  9. Vadim V
    Member
    Posted 1 year ago #

    Thanks Jesper Johansen (Jayjdk)!
    Fixed:
    line 41
    <li class="posted_by"><?php __( 'By', 'poloray' ); ?>   <?php the_author_posts_link(); ?>

  10. jajangbotram
    Member
    Posted 1 year ago #

    Hi everybody,

    I have the same problem with the poloray theme. it goes like this when I do the post or when I try to set the static page it is fine but when I change it to your latest post the problem happens . Unfortunately, I can't set the home as the static front page I don't see the option of making the home as the static front page:

    Warning: _() expects exactly 1 parameter, 2 given in /home/u517279381/public_html/wp-content/themes/poloray/single.php on line 41

    I try to solve the problem as above mentioned but it didn't work. I found the code in the editor of the wordpress theme and it is already: <li class="posted_by"><?php _e as it said it is correct, and then I've tried to use the underscore but it still didn't work.

    Can you figure out what is really going on? And can you tell me how to solve it?

    Thank you.

  11. JessicaL258
    Member
    Posted 1 year ago #

    Hi all!

    I am a novice-so bear with me. I'm having the same issue but don't even know under what header in the theme editor I should find this code. A little help please.

    Tx in advance!

  12. flashbuddy
    Member
    Posted 12 months ago #

    LOL, six months later...

    The file that needs this edit is single.php. It occurs on line 41. Suggest replacing the line entirely.

    Old Code to remove
    <li class="posted_by"><?php _( 'By', 'poloray' ); ?>&nbsp;&nbsp; <?php the_author_posts_link(); ?></li>

    New code to add in its place
    <li class="posted_by"><?php __( 'By', 'poloray' ); ?> <?php the_author_posts_link(); ?>

  13. charmillington
    Member
    Posted 11 months ago #

    I am a TOTAL newb to messing about with code, so thank you SO much for spelling it out that clearly!! It worked. My website is fixed!!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.