は、私が代わりに新しい空のウィンドウの同じウィンドウにACFフィールドから渡されたURLを開くためのボタンが必要ですが、このボタンのonclick機能をのonClickオープンURL
<input type="button" class="cta-button" value="<?php the_field('button-text'); ?>" onclick="window.open('<?php the_field('button-link'); ?>')">
お困り私はそれを働かせるために苦労しています。代わりに、あなたはonclick="window.open('<?php the_field('button-link'); ?>', '_self')"
を使用することができますwindow.open
使用window.location.href
<input type="button" class="cta-button" value="<?php the_field('button-text'); ?>" onclick="window.location.href = '<?php the_field('button-link'); ?>'">
入力ボタンにする必要がありますか? 代わりにアンカーリンクはどうですか? –