Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 3,856 through 3,870 (of 3,958 total)
  • Author
    Posts
  • in reply to: Installation error on line 133 #1036
    Anh TranAnh Tran
    Keymaster

    Hi catarinacarraro,

    Thanks for purchasing and using MB Conditional Logic.

    Sorry, this problem because Conditional Logic isn't compatibility with your PHP version, this is our bug and we'll have an update on the next day and you'll get the update shortly.

    To fix it now, you can simply replace
    ['and', 'or']

    with
    array('and', 'or')

    Then that line with become:

    
    $relation = ( isset( $condition['relation'] ) && in_array( $condition['relation'], array('and', 'or') ) ) ? $condition['relation'] : 'and';
    

    Thank you and best regards.

    Tan Nguyen

    in reply to: Include plugin on theme #1032
    Anh TranAnh Tran
    Keymaster

    Hi Alona,

    Thanks for using our plugins.

    We wouldn't recommend you include plugin in theme, the reason is same as Include Meta Box Plugin In Themes/Plugins, you can use TGM Activation Class to tell users that your theme is required that plugin.

    But incase you really need to include plugin into your theme, here is the solution. Looks like you've already purchased MB Conditional Logic, so I'll use this plugin and twentyfifteen theme for example:

    1. Copy whole plugin directory to your theme, for example twentyfiteen/inc
    2. Open your functions.php, add this snippet to the last:

    
    if ( is_admin() )
    {
    	define( 'MBC_URL', get_template_directory_uri() . '/inc/meta-box-conditional-logic/' );
    	define( 'MBC_DIR', get_template_directory() . '/inc/meta-box-conditional-logic/' );
    
    	require MBC_DIR . '/meta-box-conditional-logic.php';
    }
    

    Or you can change inc directory to whatever you want.

    Best regards

    Tan Nguyen.

    in reply to: Meta box visible on certain page? #1029
    Anh TranAnh Tran
    Keymaster

    You're welcome, and please don't hesitate to tell us if you have problem.

    in reply to: show hide question #1027
    Anh TranAnh Tran
    Keymaster

    Hi umtang41,

    Just want to notify you. Did you used Conditional Logic? Does it solved your problem? And please don't hesitate to tell us if you have problem or confusing when using it ๐Ÿ™‚

    Regards

    Tan Nguyen.

    in reply to: Meta box visible on certain page? #1026
    Anh TranAnh Tran
    Keymaster

    Hi Cristian,

    Thanks for using MB Conditional Logic.

    Conditional Logic can works with any DOM element, so you can set the visibility for meta box if page is child or parent. This is some usage example:

    Visible when the page is parent (root)

    
    'visible' => array('parent_id', '')
    

    Visible when the page is child

    
    'visible' => array('parent_id', '!=', '')
    

    Visible when the page's parent ID is 99

    
    'visible' => array('parent_id', 99)
    

    Visible in certain page (ID > 101 for example):

    
    'visible' => array('post_ID', '>', 101)
    

    These examples above uses visible action, you can use hidden action in case you want to hide it.

    Regards.

    in reply to: If is parent? #1016
    Anh TranAnh Tran
    Keymaster

    FYI, the latest version of Meta Box Show Hide now supports check for is_child. Please try it out!

    in reply to: Disable rwmb_meta() on Search Results #1011
    Anh TranAnh Tran
    Keymaster

    Hi, there's a way to change the returned value of rwmb_meta which can be useful for your case.

    The filter is rwmb_meta also and we can do like this:

    add_filter( 'rwmb_meta', 'prefix_meta', 10, 4 );
    function prefix_meta( $meta, $key, $args, $post_id )
    {
        if ( ! is_search() )
            return $meta;
    
        // If this is search page, do whatever you want with the returned value $meta
        $meta = '';
        return $meta;
    }
    in reply to: Disable rwmb_meta() on Search Results #1007
    Anh TranAnh Tran
    Keymaster

    Hi Maxell,

    That fatal error happened when you assign a value to function. You cannot do that.

    For this problem, we'll need to change the logic before $smof_data has overridden by rwmb_meta. After that, we have no chance to do it. For example, we'll assign each $smof_data index with rwmb_meta key only if current page is not search page. You can post some lines on that file and I'll have a look at with you.

    Regards.

    in reply to: Disable rwmb_meta() on Search Results #994
    Anh TranAnh Tran
    Keymaster

    Hi Maxell,

    Can you show me where did you put rwmb_meta function? If you wanna show meta box value on singular pages, like Post or Page, you can put rwmb_meta to single.php, page.php or singular.php (depend on your template hierarchy).

    In case both singular pages and archive pages in your theme are included same file. You can exclude rmmb_meta on search page like so:

    
    // Only execute rwmb_meta function when current page is not search page
    if ( ! is_search() )
       rwmb_meta('your_value');
    

    Regards

    Tan Nguyen

    in reply to: Missing: MB Conditional Logic Plugin #984
    Anh TranAnh Tran
    Keymaster

    FYI, the Conditional Logic has just been released. Please redownload the Core Extensions Bundle to get it.

    If you have any problem using the new extension, please let us know in the support forum.

    Thanks and enjoy!

    in reply to: Noob Q: help outputting content #982
    Anh TranAnh Tran
    Keymaster

    Nice to hear that you've solved the problem ๐Ÿ™‚

    in reply to: Meta Box Show Hide version 0.2 : Input values #972
    Anh TranAnh Tran
    Keymaster

    Thanks for your replies. Let me check it.

    in reply to: Missing: MB Conditional Logic Plugin #970
    Anh TranAnh Tran
    Keymaster

    Hi daveheslop,

    This plugin is under development and will be available soon. When it's available, it will be included in the Core Extensions Bundle and you can download it from your account page.

    in reply to: plupload_image as URL instead of ID #963
    Anh TranAnh Tran
    Keymaster

    Yes, of course. You can use the following code to output the full URL of an image:

    $image = rwmb_meta( 'field_id', 'type=image' );
    echo $image['full_url'];

    For more information, please read this documentation.

    in reply to: Sortable Clone Fields #958
    Anh TranAnh Tran
    Keymaster

    Hi again,

    FYI, this feature has just been added to the latest version 4.5.4. Please update the plugin to use it.

    Thanks for your idea and enjoy the plugin!

Viewing 15 posts - 3,856 through 3,870 (of 3,958 total)