What is this small code's error?

by 7 replies
10
Hello my friens. Can you fix this code?

<div class="footerleft">
</div>


Thanks.
#programming #code #error #small
  • I assume this code comes from Wordpress?

    I'm not 100 % sure, but it seems there are some '' missing, try this:

    <div class="footerleft">
    <?php _e('Powered by wordpress'); ?> <?php _e('Design by organicthemes'); ?> </div>

    edit: removed my second example, because it is wrong.
  • I believe Tashi is correct. You may also want to read more about the WordPress translation code (link provided below) because the following code is also technically acceptable (although not what you want in this case).

    <div class="footerleft">
    </div>

    What this function does is look up the localized output for the value "Powered by" in the "wordpress" domain. If it exists, it will echo it. This allows you to create a theme for deployment in multiple languages.

    In the second case above, it would look for the translation file in the wp-content\themes\organicthemes folder. If the file was not found, it would simply output "Design by."

    But, I believe that Tashi is correct based on the context of what is being output. It appears that you simply want to output the full string of text in the footer.

    You can learn more about the Wordpress localization functions here:

    Translating WordPress « WordPress Codex
  • Banned
    [DELETED]
    • [1] reply

    • Thanks. You are correct.

      Also thanks all friends.
      • [1] reply
  • Why not use the default php echo? Or simply hardcode as text in an element.
  • <div class="footerleft">
    <?php _e('Powered by', 'wordpress'); _e('Design by', 'organicthemes'); ?>
    </div>

    So this is the correct answer?

    Glad to hear your problem has been solved
    • [1] reply
    • got the same problem and solved.. thanks

Next Topics on Trending Feed