0

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!

1
  • "Administration Panel" more often refers to a page linked in the side menu. "Meta box" would be a more appropriate term to use here
    – shea
    Jan 15, 2013 at 2:53

2 Answers 2

1

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.

1
  • 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, 2013 at 0:28
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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