Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 38 total)
  • Author
    Posts
  • in reply to: Metabox PHP Group output is not correct #48110
    JoeJoe
    Participant

    Any news on fixing this bug ?

    in reply to: Polylang and Metabox compatibility #48108
    JoeJoe
    Participant

    Count me in

    in reply to: Metabox PHP Group output is not correct #47670
    JoeJoe
    Participant

    Quick question - what's the status on this little bug ?

    in reply to: Metabox PHP Group output is not correct #47609
    JoeJoe
    Participant

    You are the best Peter ๐Ÿ™‚

    in reply to: Oxygen Builder MB Group Issues #47606
    JoeJoe
    Participant

    Hi Peter,
    this has nothing to do with oxygen, I actually opened a conversation about this as well :

    https://support.metabox.io/topic/metabox-php-group-output-is-not-correct/

    in reply to: Metabox PHP Group output is not correct #47602
    JoeJoe
    Participant

    Hi Peter,
    thank you for looking into this, as I can tell from the screenshot you are using two text fields,

    the problem occurs with textareas and WYSIWYG fields (i have not tried other fields yet)

    in reply to: Oxygen Builder MB Group Issues #47558
    JoeJoe
    Participant

    Yes I can confirm this as well, actually I just wanted to write about this too.

    Did you look at the code , that Metabox is giving you ?

    When you scroll down the settings page , there is PHP Code,

    I have just one group, with 2 text fields, the code I am getting is this :

    <?php
    $groups = rwmb_meta( 'vita_group', [ 'object_type' => 'setting' ], 'test-setting' );
    foreach ( $groups as $group ) {
    	
    	// Field vita_group_year:
    	echo $group[ 'vita_group_text' ] ?? '';
    	
    	// Field vita_group_content:
    	<?php $values = $group[ 'vita_group_content' ] ?? [];
    	<?php foreach ( $values as $value ) : ?>
    		<div class="my-content"><?php echo $value ?></div>
    	<?php endforeach ?>
    
    }
    ?>

    which is wrong, the code should be

    <?php
    $groups = rwmb_meta( 'vita_group', [ 'object_type' => 'setting' ], 'test-setting' );
    foreach ( $groups as $group ) {
    	
    	// Field vita_group_year:
    	echo $group[ 'vita_group_text' ] ?? '';
    	
    	// Field vita_group_content:
    	echo $group[ 'vita_group_content' ] ?? '';
    
    }
    ?>

    Maybe that messes up the Oxygen output ?

    in reply to: How do I get this to work #46144
    JoeJoe
    Participant

    Thanks Peter, can this be done via the grahical interface ?

    in reply to: Add more fields to a relationship #46106
    JoeJoe
    Participant

    Hello any news on this ?

    in reply to: โœ…Show or Hide Fields Based On Role #46101
    JoeJoe
    Participant

    any news on this ?

    in reply to: โœ…Woocommerce Content and Excerpt in TAB #46042
    JoeJoe
    Participant

    Just read your comment , and yes it did the trick, thank you very much

    in reply to: โœ…Adding a Text Title Under Image Select Options #45171
    JoeJoe
    Participant

    Has there been any movement on this ?

    in reply to: Add more fields to a relationship #43100
    JoeJoe
    Participant

    any news on this ?

    in reply to: โœ…Woocommerce & Tabs #42794
    JoeJoe
    Participant

    Excellent, thank you very much,
    can you extend the code for the sku, regular price and discounted price ?

    in reply to: โœ…rwmb_the_value question #42270
    JoeJoe
    Participant

    Found the solution, so just in case somebody needs the same

    <?php
    // Get all users with the 'author' role
    $author_users = get_users(
        array(
            'role' => 'author'
        )
    );
    // Classes to be randomized
    $classes = ['avatar--m', 'avatar--l', 'avatar--xl', 'avatar--xxl'];
    // Randomize the order of authors
    shuffle($author_users);
    // Display up to 7 authors
    $count = 0;
    foreach ($author_users as $author) {
        // Displaying uploaded image
        $image = rwmb_meta('custom_avatar', ['object_type' => 'user', 'size' => 'thumbnail'], $author->ID);
        // Check if the user has a custom avatar image
        if (!empty($image)) {
            $random_class = $classes[array_rand($classes)];
            echo '<img src="' . $image['url'] . '" class="' . $random_class . '">';
            $count++;
        }
        if ($count >= 7) {
            break; // Stop after displaying 7 authors
        }
    }
    ?>
Viewing 15 posts - 1 through 15 (of 38 total)