Relationship Field – Add New Window Squished

[ad_1]

Several users have reported WordPress 6.3 changed the HTML output to wrap the iframe in a div, which causes the iframe height of 100% to not take effect. Changing the iframe height to something like 95vh would likely resolve it @sc0ttkclark

@pdclark Is this a bug or something I can adjust myself?

@thewildinitiative It is both a bug and something you can adjust yourself.

It’s being tracked for resolution in an update on issue #7132. While waiting for a patch to the core CSS, the following PHP appears to resolve the issue:

<?php

add_filter(
	'admin_head',
	function() {
		global $pagenow;
		if ( in_array( $pagenow, [ 'post.php', 'post-new.php' ] ) ) {
?>
<style>
	.pods-iframe-modal .components-modal__content > div {
		height: 100%;
	}
	/**
	 * The above change causes the modal header to align to the iFrame's center.
	 * This moves it to the top.
	 */
	.pods-iframe-modal .components-modal__header {
		align-items: start;
	}
	.pods-iframe-modal .components-modal__header-heading-container {
		display: block;
	}
</style>
<?php
		}
	}
);

In testing, this occurred on 2.9.19 + 6.3 in cases where the currently edited post object was non-Gutenberg, regardless of whether the linked relationship was a Gutenberg-enabled post type or not.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer