WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Widget
[resolved] New version for you (2.0.3) (2 posts)

  1. Julio Potier
    Member
    Posted 9 months ago #

    Hello

    This is not a support request. I'm using your plugin, but i did not want to recreate posts, i already have my custom post type.
    So, i just added a filter on "content_block" post type string.
    So now, you can do this :

    add_filter( 'cpt_for_cpw', 'baw_cpt_cpw' );
    function baw_cpt_cpw()
    {
    	return 'my_custom_post_type';
    }

    To get all my own posts in your widget.
    So the filter is 'cpt_for_cpw', it stands for "custom-post-type_for_custom-post-widget" ;)

    Link to .zip (check viruses before open) :
    https://dl.dropboxusercontent.com/u/45956904/custom-post-widget.2.0.3.zip

    See you !

    http://wordpress.org/extend/plugins/custom-post-widget/

  2. Johan van der Wijk
    Member
    Plugin Author

    Posted 9 months ago #

    Hi Julio,

    I'm not sure if this works when you want to use the default content_block post type without having to specify this in the functions.php file because of this:

    if( apply_filters( 'cpt_for_cpw', 'content_block' ) == 'content_block' ) {

    What happens if you have not specified anything in?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.