• So, on the category page, between article and the start of article on all articles I get this error:

    Warning: Missing argument 1 for __(), called in /home/a7489532/public_html/wp-content/themes/Netboxx/archive.php on line 28 and defined in /home/a7489532/public_html/wp-includes/l10n.php on line 96

Viewing 2 replies - 1 through 2 (of 2 total)
  • Can you please show the code in:

    Line 28: For > /wp-content/themes/Netboxx/archive.php

    and

    Line 96: For > /wp-includes/l10n.php

    So we can see the code, and find the solution.

    Thread Starter kozzmic

    (@kozzmic)

    line 28 archive, something like this:

    <?php the_content(__());?><div style="clear:both;"></div>
    
    			<div class="postmeta2">
    				<p><span class="tags">Tags: <?php the_tags('') ?></span></p>
    			</div>
    
    			<?php endwhile; else: ?>
    
    			<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    			<p><?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?></p>
    
    		</div>

    Line 96:

    /**
     * Retrieves the translation of $text. If there is no translation, or
     * the domain isn't loaded, the original text is returned.
     *
     * @see translate() An alias of translate()
     * @since 2.1.0
     *
     * @param string $text Text to translate
     * @param string $domain Optional. Domain to retrieve the translated text
     * @return string Translated text
     */
    function __( $text, $domain = 'default' ) {
    	return translate( $text, $domain );
    }
    
    /**
     * Retrieves the translation of $text and escapes it for safe use in an attribute.
     * If there is no translation, or the domain isn't loaded, the original text is returned.
     *
     * @see translate() An alias of translate()
     * @see esc_attr()
     * @since 2.8.0
     *
     * @param string $text Text to translate
     * @param string $domain Optional. Domain to retrieve the translated text
     * @return string Translated text
     */
    function esc_attr__( $text, $domain = 'default' ) {
    	return esc_attr( translate( $text, $domain ) );
    }
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error on category page’ is closed to new replies.