• Resolved dianamichal

    (@dianamichal)


    Hi, I am not receiving any notifications in email for new post in my custom post type. I already confirmed my settings. I am receiving the test email though.
    I’m creating post in my website not in wordpress backend. And the user publishing posts is a Subscriber I customized their roles so they can publish / create posts.

    https://www.ads-software.com/plugins/bnfw/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author bnfw

    (@voltronik)

    Hi dianamichal,
    Thanks for your message.

    It sounds like you need to add the appropriate filter to your functions.php file in order to trigger notifications when posted via the front-end.

    Can you please take a look at this document and implement the appropriate filter?

    Let me know how you get on.

    Thanks,
    Jack

    Thread Starter dianamichal

    (@dianamichal)

    Thanks Jack will try this and get back to you.

    Thread Starter dianamichal

    (@dianamichal)

    Hello Jack i tried this

    function bnfw_insert_post_hook_for_theme( $themes ) {
    $themes[] = ‘theme_name’;
    return $themes;
    }
    add_filter( ‘bnfw_insert_post_themes’, ‘bnfw_insert_post_hook_for_theme’ );

    but it didn’t work. i put it in my functions.php

    Plugin Author bnfw

    (@voltronik)

    Hi dianamichal,
    Ok.

    Can you check that the apostrophes are straight and not curly and that you replace the text that says ‘theme_name’ with the slug of your theme?

    Thanks,
    Jack

    Thread Starter dianamichal

    (@dianamichal)

    function bnfw_insert_post_hook_for_theme( $themes ) {
    $themes[] = 'dev-starter-theme';
    return $themes;
    }
    add_filter( 'bnfw_insert_post_themes', 'bnfw_insert_post_hook_for_theme' );

    Yes i changed the curly to apostrophe

    Plugin Author bnfw

    (@voltronik)

    Hi dianamichal,

    Ok, so the filter isn’t working and you’re posting through a front-end form that you’ve coded in your theme that isn’t added or handled via a plugin to add the functionality – is that correct?

    Jack

    Thread Starter dianamichal

    (@dianamichal)

    Yes that’s correct.

    Plugin Author bnfw

    (@voltronik)

    Can you try with the name of your theme as opposed to the slug instead?

    Jack

    Thread Starter dianamichal

    (@dianamichal)

    I already tried that earlier. nothing happened. maybe I’m doing something wrong. HMMMM.
    I have an html form for the new post, then wp_insert_post to save the post.

    Plugin Author bnfw

    (@voltronik)

    Ah, so you’re saving the post first and then inserting it using wp_insert_post?

    Jack

    Thread Starter dianamichal

    (@dianamichal)

    i have this for saving or inserting my post in a custom post type

    $post_id = wp_insert_post(
    	array(
    		'comment_status'	=>	'closed',
    		'ping_status'		=>	'closed',
    		'post_author'		=>	$author_id,
    		'post_name'		=>	$slug,
    		'post_title'		=>	$title,
    		'post_status'		=>	'publish',
    		'post_type'			=>	'projects'
    	)
    );

    Plugin Author bnfw

    (@voltronik)

    Hi dianamichal,
    Ah, I think the filter above will only work for the default ‘post’ post type.

    If you change your wp_insert_function to use ‘post’ instead of ‘projects’ does it work, providing that the above filter is still added to your theme?

    Thanks,
    Jack

    Plugin Author bnfw

    (@voltronik)

    Closing due to inactivity. If you need further help with this, please feel free to re-open this thread.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Not receiving emails.’ is closed to new replies.