douxian1923 2014-11-19 13:22
浏览 7

如何在WordPress中插入“应用”按钮

I am building a job website and I am trying to insert an 'apply' button in a custom post-type single page (called 'vacancy') within WordPress. I need this button to notify the admin of the new 'application' = meaning someone logged in clicked on the button.

I have thought about using the comment_form() function but I am not sure how to adapt it to register the "button" click. It doesn't show anything at all in fact.

I have got the following code inside the WP_Query( $mypost ) while( have_posts() ) : the_post(); loop:

if ( comments_open() || get_comments_number() ) :
    if ( post_password_required() ) {
    return;
    }
    comment_form( array(
        'comment_field' =>  '',
        'label_submit'  =>  __( 'Apply' ),
        'comment_notes_after'   => ''
    ),
    $mypost
    );
endif;

I don't want to affect the general comments as I may need them for the normal posts and pages, and preferably if I can separate it from the comments and instead have something else - but I can't think of another way to do it.

Thanks in advance! Really do appreciate any suggestions/help.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 划分vlan后不通了
    • ¥15 GDI处理通道视频时总是带有白色锯齿
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)
    • ¥15 自适应 AR 模型 参数估计Matlab程序
    • ¥100 角动量包络面如何用MATLAB绘制
    • ¥15 merge函数占用内存过大
    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大