What is the potential issue with using iframes for a WordPress site?

Using iframes for a WordPress site can pose security risks such as cross-site scripting attacks and can also negatively impact SEO as content within iframes may not be indexed by search engines. To solve this issue, it is recommended to use WordPress's built-in functions like wp_remote_get() or wp_remote_post() to fetch external content and display it on your site without using iframes.

// Example of fetching external content without using iframes
$response = wp_remote_get( 'https://example.com/external-content' );

if ( is_wp_error( $response ) ) {
    echo 'Error fetching external content';
} else {
    echo wp_remote_retrieve_body( $response );
}