Support Forum ยป User Profile

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: โœ…Error: Template not found: #tmpl-rwmb-media-button #43504
    info@j0e.org[email protected]
    Participant

    Fixed, but why not push an update?

    in reply to: Show custom fields without updating #38059
    info@j0e.org[email protected]
    Participant

    mb_get_block_field() was not working.
    But I had to replace post.ID with post_id

    in reply to: Show custom fields without updating #38058
    info@j0e.org[email protected]
    Participant

    My site is crashing, if I use the function mb_get_block_field().
    I am in the field "Render code":
    screen

    in reply to: Check if MB plugin and extension is active #37943
    info@j0e.org[email protected]
    Participant

    Thank you Long.

    I have added now "mb_admin_column_load" to the if, but it is still crashing if I deactivate AIO.
    Is it not easier to check it the two plugins are active?
    How can I do that?

    if ( function_exists( 'rwmb_meta' ) OR function_exists( 'mb_admin_column_load' ) ) {
    	add_action( 'admin_init', 'prefix_add_custom_columns', 20 );
    }
    function prefix_add_custom_columns() {
    	class Prefix_Custom_Admin_Columns extends \MBAC\Post {
    		public function columns( $columns ) {
    			$columns  = parent::columns( $columns );
    			$position = 'before';
    			$target   = 'title';
    			$this->add( $columns, 'featured_image', 'Image', $position, $target );
    			// Add more if you want
    			return $columns;
    		}
    		public function show( $column, $post_id ) {
    			switch ( $column ) {
    				case 'featured_image':
    					the_post_thumbnail( [60, 60] );
    					break;
    					// More columns
    			}
    		}
    	}
    	new Prefix_Custom_Admin_Columns( 'post', array() );
    	new Prefix_Custom_Admin_Columns( 'page', array() );
    	new Prefix_Custom_Admin_Columns( 'review', array() );
    }
    in reply to: Check if MB plugin and extension is active #37564
    info@j0e.org[email protected]
    Participant

    Hello Long,
    sorry I am not a programmer. I don't know how to use this correctly.

    My site is still crashing after using this

    add_action( 'admin_init', 'prefix_add_custom_columns', 20 );
    function prefix_add_custom_columns() {
      if ( ! function_exists( 'rwmb_meta' ) ) {
        function rwmb_meta( $key, $args = [], $object_id = null ) {
            return null;
        }
      }
      class Prefix_Custom_Admin_Columns extends \MBAC\Post {
        public function columns( $columns ) {
          $columns  = parent::columns( $columns );
          $position = 'before';
          $target   = 'title';
          $this->add( $columns, 'featured_image', 'Image', $position, $target );
          // Add more if you want
          return $columns;
        }
        public function show( $column, $post_id ) {
          switch ( $column ) {
            case 'featured_image':
              the_post_thumbnail( [60, 60] );
              break;
              // More columns
          }
        }
      }
      new Prefix_Custom_Admin_Columns( 'post', array() );
      new Prefix_Custom_Admin_Columns( 'page', array() );
      new Prefix_Custom_Admin_Columns( 'review', array() );
    }

    Can you please correct it for me?
    Jochen

    in reply to: โœ…Displaying Featured Image in Admin Columns #37535
    info@j0e.org[email protected]
    Participant

    David, your code is working great for me.
    Thanks
    Jochen

    in reply to: โœ…Different logo and navagation for CPT #27130
    info@j0e.org[email protected]
    Participant

    Thank you.

    So I need a new template file?
    I have to look into it...

Viewing 7 posts - 1 through 7 (of 7 total)