Adding custom fields to Prayer Requests

About Support Prayer Requests Adding custom fields to Prayer Requests

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5989
    Avatar for David CamejoDavid Camejo
    Participant

    Hello, Andy. Best regards. I would like to know if it is possible to add custom fields to Prayer Requests. Prayer Requests is a custom post type but it does not includes a WordPress author by default (at lest not visibly). The fact is that I want to open up the possibility to (unregistered) visitors can also send prayer requests. Then, with the help of some custom fields I would get the data of the visitor making the request: Name, email, etc. Obviously I could create those custom fields by myself and add it, but that way they wouldn’t be native to Prayer Requests. Either way that way would work for me too, I just wanted to know if the Church Admin allow the adding of native custom fields to be added to Prayer Requests. Or if there’s a way to get visitors data and I haven’t seen it yet, please let me know. Thanks in advance.

    #5990
    Avatar for David CamejoDavid Camejo
    Participant

    I forget something. How can I make Prayer Request Published by default?

    #5991
    Avatar for David CamejoDavid Camejo
    Participant

    How can I make Prayer Request Published by default?
    I found it!

    // Set Prayer Requests ‘publish’ by default
    function set_default_post_status($post) {
    if ($post[‘post_type’] == ‘prayer-requests’ && $post[‘post_status’] == “draft”) {
    $post[‘post_status’] = ‘publish’;
    }
    return $post;
    }
    add_filter(‘wp_insert_post_data’, ‘set_default_post_status’);

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.