WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Global Translator] Widget title name (8 posts)

  1. Supporter1984
    Member
    Posted 6 years ago #

    How can i add a title name to my widget? Im using the latest version but i cant have any title on the widget on my sidebar. Someone knows how to?

    http://wordpress.org/extend/plugins/global-translator/

  2. mrangoonwala
    Member
    Posted 6 years ago #

    I am having the same problem. It was working fine with 0.8, and I did an auto upgrade to 0.9 and now the title is gone...

  3. mrangoonwala
    Member
    Posted 6 years ago #

    OK, doing some digging in the code, i found the answer. I compared my offline files, which were 0.8 to the online ones, which were 0.9. In the 0.9, go to line 397, and change:

    $buf = '';

    to

    $buf = '<h2>Translate This Blog</h2>';

    Or whatever else you want the title to say.

    Now though, I have another issue though, but I think thats related to my theme rather than this plugin.

  4. SemperFideles
    Member
    Posted 6 years ago #

    Thanks for an idea mranoonwala but that didn't solve the problem. The text you added adds an additional line below the title bar. This is a frustrating bug in the code.

    Anyone know how to resolve it?

  5. nhowarth
    Member
    Posted 6 years ago #

    I used to have the global-translation plugin in my sidebar - I used the samsarin php plugin widget (rather than the one supplied) with the following code in the php area:

    <div align="center">

    • <?php if(function_exists("gltr_build_flags_bar")) { gltr_build_flags_bar(); } ?>
    </div>

    It worked for me, but you need to check the 'Enclose the flags inside a table' to get them spaced properly.

    I've since moved the flags to the top of the page.

    Cheers,

  6. jadedsabre
    Member
    Posted 6 years ago #

    I don't know how to add the ability to customize the title within the widget control, but I did figure out how to hard code a title into the plugin.

    Edit line 861 echo $before_widget . $before_title . $after_title;

    to echo $before_widget . $before_title . 'Translate This Blog' . $after_title;

  7. pclove
    Member
    Posted 6 years ago #

    Thanks, jadedsabre! Your solution fixed my issue with the title.

    Also, I wanted to change the size of the text to be small, so I had to create a new font style in my theme's CSS file, which was no big deal.

    Thanks again, bro!

  8. garethooper
    Member
    Posted 5 years ago #

    jadedsabre's post works upto Version 0.9.1.1 and can be found on Line 896 in translator.php

    echo $before_widget . $before_title . 'Translate This Blog' . $after_title;

Topic Closed

This topic has been closed to new replies.

About this Topic