Home Forums Plugin Support WP User Frontend (Free Version) Ajax functionality

This topic is: resolved

This topic contains 11 replies, has 2 voices, and was last updated by  M 5 years, 5 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #14169

    M
    Member
    Post count: 16

    Hi there,

    This morning I have bought the plugin and I was searching for category with Ajax functionality.
    As said here it is available in the free version, so I am really suprised it is not in the paid version.
    This was one of the main things I really liked about the plugin.
    The reason why is as follows:

    My website has about 8 categories which each have a lot of sub-categories. Users are going to post on my site and the posts has to be assigned to the
    sub-categories and not the main category. In the dropdown in de paid version the user can also select the main categorie. (Excluding the main-categories from the
    dropdown is not really an optin, because it then becomes a long list with no hierarchie.
    Any other solution?

    #14173

    Tareq Hasan
    Keymaster
    Post count: 2831

    You can try this solution for now if you want.

    http://wedevs.com/support/topic/display-child-category/#post-13268

    #14174

    M
    Member
    Post count: 16

    Hi,

    Thanks for the quick reply. I did came accross this function and already put it in my functions.php, but the problem with this function is, that the post is also saved in the main-category because it is selected. It only has to be saved in the sub-category

    #14177

    M
    Member
    Post count: 16

    I would realy like to know is there is a solution for this problem. Otherwise, I would have to ask you to deposit my money back. (Currently developping on localhost, so I did not activate it yet)

    My whole site depends on user submitted posts and the categorie selection is very important.

    #14183

    Tareq Hasan
    Keymaster
    Post count: 2831

    Currently there isn't any solution, sorry!

    Sadly we have “NO” refund policy.

    Hopefully we'll bring the feature back in a future version.

    #14185

    M
    Member
    Post count: 16

    Maybe you can help me out. I came accross this solution, but this is for back-end posting. Can you please help me out so I can use it in your front-end plugin:

    I don't know how to re write it and put it in my functions.php:

    
    add_action( 'admin_footer-post.php',     'disable_top_categories_checkboxes' );
    add_action( 'admin_footer-post-new.php', 'disable_top_categories_checkboxes' );
    
    /**
     * Disable parent checkboxes in Post Editor.
     */
    
    function disable_top_categories_checkboxes() {
        global $post_type;
    
        if ( 'post' != $post_type )
            return;
        ?>
            <script type="text/javascript">
                jQuery( "#category-all ul.children" ).each( function() {
                    jQuery(this).closest( "ul" ).parent().children().children( "input" ).attr( 'disabled', 'disabled' )
                });
            </script>
        <?php
    }
    
    #14189

    Tareq Hasan
    Keymaster
    Post count: 2831

    Do you know that this snippet does? It just disables the child checkboxes.

    #14194

    M
    Member
    Post count: 16

    I know what it does, it disables the parent categories from being selectable
    See this link

    I wonder if it is possible to embed it with the solution you provided in your first reply.

    #14199

    M
    Member
    Post count: 16

    Maybe there are two other alternatives you can provide?

    First one:

    All categories and sub-categories appear in 1 dropdown , but the main category can not be selectable

    Second option:
    Make the checkboxes radiobuttons, so in this case only 1 sub-categorie can be selected.

    #14202

    Tareq Hasan
    Keymaster
    Post count: 2831

    The first solution can be done with one line ๐Ÿ˜€
    [js]jQuery(‘#category option.level-0').attr(‘disabled', ‘disabled');[/js]

    #14203

    M
    Member
    Post count: 16

    Sometimes solutions can be so simple ๐Ÿ™‚

    Can you help me how to put it in my functions.php?

    #14204

    M
    Member
    Post count: 16

    Never mind, I have got it, thanks a lot

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Ajax functionality’ is closed to new replies.