php - 如何将自定义模式添加到管理编辑帖子页面

时间:2016-04-29 11:11:39

标签: php jquery html

我想添加一个模式,显示何时单击设置的精选图像按钮。我目前有一个简单的jquery警报,它解释了所需图像的最小宽度和高度。

 jQuery(document).ready(function(){
  jQuery('#set-post-thumbnail').click( function(){ 
    alert('Thumbnail/Featured images need to be at least width: 450px by height: 640px; '); 
   });
 });

我希望能够获得更全面的视觉解释,因为我的最终用户不具备计算机知识。

我尝试了一些像thickbox这样的选项:

add_thickbox();
<a href="your url" class="thickbox">click here</a>

在我的edit.php页面上工作得很好,但我的PHP知识不够好,无法正确掌握添加到我的functions.php或posts.php的内容,以便在编辑时弹出某种类型帖子页面。

提前致谢:)

1 个答案:

答案 0 :(得分:0)

试试这个,这里是fiddle

      <h2>Animated Modal with Header and Footer</h2>
  <!-- Trigger/Open The Modal -->
  <button id="myBtn">Open Modal</button>
  <!-- The Modal -->
  <div id="myModal" class="modal">
      <!-- Modal content -->
      <div class="modal-content">
          <div class="modal-header">
              <span class="close">×</span>
              <h2>Modal Header</h2>
          </div>
          <div class="modal-body">
              <p>Some text in the Modal Body</p>
              <p>Some other text...</p>
          </div>
          <div class="modal-footer">
              <h3>Modal Footer</h3>
          </div>
      </div>
  </div>
相关问题