Forum has been created to help all our customers in properly working our theme. We offer complete help with configuration theme and make default look, just like on our Brandon demo. We don`t offer theme customization.

Before creating a new discussion, please:
1. Check on forum if discussion hasn`t been created before. Use the forum Search on the right.
2. Read carefully the documentation included to package.
If you didn`t find what you need and would like to post a new question click the "Start a New Discussion" button on the right.
4. You can post on forum only after registration (you need purchase code to register) .


NOTE!!! If you are starting a new topic and have got problems with your site and you want us to check what`s wrong please always give url to your site because without that we can`t check what`s wrong. Each case may be different because of your installed plugins, servers or other things.

Domain migration - how to change Content Builder paths for images, etc with MFN CB Migrate Tool?
  • If you build your website on localhost or maybe on other server and then you want to migrate everything, you need to read this topic! We`ll explain here how to change paths for images and other media inside Muffin Builder as it can`t be moved with XML file. We did tool especially for that.

    At first please open functions.php file inside theme folder and before and closing php tag which is at the end of file:

    ?>

    please replace with the code from the following paste http://pastie.org/8729375

    If pastie.org service doesn`t work then we also present the same code below:

    function mfn_migrate_menu() {
    add_submenu_page(
    'tools.php',
    'Muffin Content Builder Migrate Tool',
    'Mfn CB Migrate Tool',
    'edit_theme_options',
    'mfn_migrate_cb',
    'mfn_migrate_cb'
    );
    }
    add_action('admin_menu', 'mfn_migrate_menu');

    function mfn_migrate_cb(){

    global $wpdb;

    $safety_limit = 10;

    if( key_exists( 'mfn_migrate_nonce',$_POST ) ) {
    if ( wp_verify_nonce( $_POST['mfn_migrate_nonce'], basename(__FILE__) ) ) {

    $old_url = stripslashes(htmlspecialchars($_POST['old']));
    $new_url = stripslashes(htmlspecialchars($_POST['new']));

    if( strlen($old_url) < $safety_limit || strlen($new_url) < $safety_limit ){

    echo '<p><strong>For your own safety please use URLs longer than '. $safety_limit .' characters !</strong></p>';

    } elseif( strpos( $old_url, 'http' ) !== 0 || strpos( $new_url, 'http' !== 0 ) ){

    echo '<p><strong>URLs must begin with http:// or https:// !</strong></p>';

    } else {

    $results = $wpdb->get_results( "SELECT * FROM $wpdb->postmeta
    WHERE `meta_key` = 'mfn-page-items'
    " );

    if( is_array( $results ) ){

    // posts loop -----------------
    foreach( $results as $result_key=>$result ){
    $meta_id = $result->meta_id;
    $meta_value = unserialize(base64_decode($result->meta_value));

    // print_r($meta_value);

    // sections loop ----------------
    foreach( (array)$meta_value as $sec_key=>$sec ){

    // section attr loop ----------------
    foreach( (array)$sec['attr'] as $attr_key=>$attr ){
    $attr = str_replace($old_url, $new_url, $attr);
    $meta_value[$sec_key]['attr'][$attr_key] = $attr;
    }

    // items loop ----------------
    foreach( (array)$sec['items'] as $item_key=>$item ){

    // meta fields loop ----------------
    foreach( (array)$item['fields'] as $field_key=>$field ){
    $field = str_replace($old_url, $new_url, $field);
    $meta_value[$sec_key]['items'][$item_key]['fields'][$field_key] = $field;
    }

    }

    }

    // print_r($meta_value);

    $meta_value = base64_encode(serialize($meta_value));
    $wpdb->query( "UPDATE $wpdb->postmeta
    SET `meta_value` = '". addslashes($meta_value) ."'
    WHERE `meta_key` = 'mfn-page-items'
    AND `meta_id`= ". $meta_id ."
    ");
    }
    }
    echo '<p><strong>All done. Have fun!</strong></p>';

    }
    } else {
    echo '<p><strong>Invalid Nonce !</strong></p>';
    }
    }

    ?>
    <div class="wrap">

    <div id="icon-tools" class="icon32"></div>
    <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
    <br />

    <form action="" method="post">

    <input type="hidden" name="mfn_migrate_nonce" value="<?php echo wp_create_nonce(basename(__FILE__)); ?>" />

    <label style="width:50px; display:inline-block;">Find</label>
    <input type="text" name="old" value="" placeholder="Old URL" style="width:300px;" />
    <br />

    <label style="width:50px; display:inline-block;">Replace</label>
    <input type="text" name="new" value="<?php echo home_url(); ?>" style="width:300px;" />

    <input type="submit" name="submit" class="button button-primary" value="Replace" />

    </form>

    </div>
    <?php
    }


    After that, you can go to your wp dashboard and in Tools section you will get new tool called: Mfn CB Migrate Tool. Just open it and there you can easily change paths for content builder items :)

    We hope this will be easy and clear for you guys!
  • 7 Comments sorted by
  • Why this just works for Columns?? why it did not make changes in Accordion or Tabs?? 

    Thankyou
  • any idea why it don't work? becouse i need to take the website online :-(

    thanks
  • Thankyou so much! You are the best!  ;-)