5 / 5 ( 1 bình chọn )
Bạn có muốn tạo một thông báo đầu bài viết Genesis Framework để thông báo quà tặng hay bất cứ thứ gì quan trọng cho người đọc không? Dưới đây là hướng dẫn chi tiết.
Nội dung
Đăng ký chức năng thông báo trong FunctionsĐầu tiên bạn mở file //* Thêm thông báo đầu bài viết Genesis Framework add_action( 'genesis_before_entry_content', 'custom_notice' ); /** * Add custom affiliate link disclosure notice above the content on single Posts. */ function custom_notice() { // if this is not a single Post, abort. if ( ! is_singular( 'post' ) ) { return; } ?> <div class="affiliate-disclosure-notice"> <p>Đây là nội dung thông báo của bạn </p> </div> <?php } Thêm style cho phần thông báoDán đoạn css sau vào cuối cùng file .affiliate-disclosure-notice { margin-bottom: 30px; padding: 12px; border-left: 3px solid #dfa29f; color: #4f3526; background-color: #f6f6f6; font-size: 14px; border-radius: 0 2px 2px 0; font-style: italic; text-align: center; } Và đây là thành quả Chúc bạn thành công!!! Via https://quyenduongit.com/tao-thong-bao-dau-bai-viet-genesis-framework/
0 Comments
Leave a Reply. |