Ajax functionality

This topic contains 11 reply and 2 voices, and was last updated by M 10 years, 2 months ago
Viewing 11 Posts - 1 through 11 (of 11 total)
Author Posts
January 6, 2014 at 2:55 pm 14169
M 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?
January 6, 2014 at 3:34 pm 14173
Tareq Hasan Tareq Hasan

You can try this solution for now if you want.

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

January 6, 2014 at 3:41 pm 14174
M M

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

January 6, 2014 at 7:50 pm 14177
M M

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.

January 6, 2014 at 9:18 pm 14183
Tareq Hasan Tareq Hasan

Currently there isn’t any solution, sorry!

Sadly we have “NO” refund policy.

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

January 6, 2014 at 9:55 pm 14185
M M

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
}
January 7, 2014 at 12:01 am 14189
Tareq Hasan Tareq Hasan

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

January 7, 2014 at 3:21 am 14194
M M

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.

January 7, 2014 at 12:09 pm 14199
M M

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.

January 7, 2014 at 3:16 pm 14202
Tareq Hasan Tareq Hasan

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

January 7, 2014 at 3:20 pm 14203
M M

Sometimes solutions can be so simple 🙂

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

January 7, 2014 at 3:23 pm 14204
M M

Never mind, I have got it, thanks a lot

Viewing 11 Posts - 1 through 11 (of 11 total)