Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm working with a Lucidpress theme at the moment. A client has asked that the "Lucidpress Options" title of a metabox on the page editor screen be changed. I have searched through the Lucidpress theme and have not found anywhere to change the title.

Does anyone know, offhand, where to find this? Can anyone at least tell me what sort of a function I would be looking for? Could I do something similar to this: Change The Title Of a Meta Box ?

Cheers!

share|improve this question
    
"Administration Panel" more often refers to a page linked in the side menu. "Meta box" would be a more appropriate term to use here –  bungeshea_ Jan 15 '13 at 2:53

2 Answers 2

up vote 1 down vote accepted

Look for add_meta_box or grep the Lucidbox directory for the metabox title-- "Lucidpress Options". It shouldn't be too hard to find. As I don't use that theme, or any other publicly released theme, I don't know what else to say to you.

share|improve this answer
    
Thanks for this. Used the Ctrl+F "Find in Files" function of Notepad++ (that I didn't know existed until now -- Really useful) –  connorbode Jan 31 '13 at 0:28

You can change the original string using any good editor (Notepad++, TextMate, SublimeText, NetBeans, coff... Dreamweaver), that will allow you to make a global search and find that string. Of course, this modifies the original theme and after any upgrade, you'll have to do it again.

One option could be: unregistering the meta box in your child theme and registering it again with the new name.

Two workarounds:

1) WordPress SEO by Yoast has the string properly registered and this works:

add_filter( 'gettext', 'change_text_wpse_81595', 10, 2 );

function change_text_wpse_81595( $translation, $text ) {
    if ( $text == 'WordPress SEO by Yoast' )
        return __('SEO','my-plug-text-domain');

    return $translation;
}

2) The theme where I'm testing does not registers the string properly and jQuery has to be used:

add_action( 'admin_head-post.php', 'rename_meta_box_wpse_81595', 15 );
add_action( 'admin_head-post-new.php', 'rename_meta_box_wpse_81595', 15 );

function rename_meta_box_wpse_81595()
{
    // Remove this if the change is to be made everywhere
    global $current_screen;
    if( 'page' != $current_screen->post_type )
        return;

    ?>
    <script type="text/javascript">
    jQuery(document).ready(function($) {   
        // Locate the proper target, this one is just a sample
        $("#woothemes-settings h3 span").html('Custom Box');
    });             
    </script>
    <?php
}

If you need to translate many strings, this may help: Change the text on the Publish button

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.