Support » Plugin: Recent Posts Widget Extended » Limit in categories and tags

  • Resolved donPablo

    (@nook86)


    hello is chance to increase limit of categories which is 100 to 1000 and tags to 5000 ? it has limit to 100 now and i cannot choose categories cause i got them plenty hehe πŸ™‚

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

    (@idenovasi)

    I am sorry it’s not possible right now, because it’s a performance thing. If I increase the number it will slow your admin page. I need a proper way to display more than 100 categories and tags.

    any prompt how to override it and add pemamently to functions.php ?:) one for cat one for tags?
    i love this plugin better is than others but now i cannot use it hehe πŸ™‚

    • This reply was modified 1 month, 2 weeks ago by donPablo.
    Plugin Author Idenovasi

    (@idenovasi)

    You can override the plugin code but if you see an update from the plugin you need to backup your code.

    but can you help me with code which can ovveride ? πŸ™‚

    Plugin Author Idenovasi

    (@idenovasi)

    This one https://github.com/themejunkie/recent-posts-widget-extended/blob/master/includes/helpers.php#L21

    in file recent-posts-widget-extended/includes/helpers.php

    i have changed numbers but tags are still limited to 100 hmm and categories also …

    btw if i put that code to functions php i see

    ===================
    BΕ‚Δ…d typu E_ERROR zostaΕ‚ spowodowany w linii 458 pliku /var/www/clients/client2/web2/web/wp-content/themes/mystery-child/functions.php. Komunikat bΕ‚Δ™du: Cannot redeclare rpwe_cats_list() (previously declared in /var/www/clients/client2/web2/web/wp-content/plugins/recent-posts-widget-extended/includes/helpers.php:42)

    but its not necesarry would be nice to have it in functions but i can change code manually but that file helpers.php i think its not that file where i can increase numbers

    Plugin Author Idenovasi

    (@idenovasi)

    yes and i said i changed and that not work in that helpers.php file πŸ™‚ evn when you change number to 1000 its still 100 hmm…

    in another plugin i got sollution like this to make it nice working
    in file in plugins was constants:

    if( !defined( ‘WPNW_VERSION’ ) ) {
    define( ‘WPNW_VERSION’, ‘4.2’ ); // Version of plugin
    }
    if( !defined( ‘WPNW_DIR’ ) ) {
    define( ‘WPNW_DIR’, dirname( __FILE__ ) ); // Plugin dir
    }
    if( !defined( ‘WPNW_POST_TYPE’ ) ) {
    define( ‘WPNW_POST_TYPE’, ‘news’ ); // Plugin post type
    }
    if( !defined( ‘WPNW_CAT’ ) ) {
    define( ‘WPNW_CAT’, ‘news-category’ ); // Plugin Category
    }

    and to functions.php i get something like below, co it rewrites settings from plugin file

    add_filter( ‘register_post_type_args’, ‘custom_register_post_type_args’, 10, 2 );
    function custom_register_post_type_args( $args, $post_type ) {

    if ( ‘news’ === $post_type ) {
    $args[‘rewrite’][‘slug’] = ‘nius’;

    // Then flush them
    flush_rewrite_rules();
    }

    return $args;
    }

    if(!defined( ‘WPNW_POST_TYPE’ ) ) {
    define(‘WPNW_POST_TYPE’, ‘nius’); // Plugin post type
    }

    //************** Renaming news-category post type name to wiadomosci *************************/
    function custom_modify_taxonomy_args() {
    // get the arguments of the already-registered taxonomy
    $news_category_args = get_taxonomy( ‘news-category’ ); // returns an object

    $news_category_args->show_admin_column = true;
    $news_category_args->rewrite[‘slug’] = ‘niusy’;
    $news_category_args->rewrite[‘with_front’] = false;

    // re-register the taxonomy
    register_taxonomy( ‘news-category’, ‘news’, (array) $news_category_args );
    }
    // hook it up to 11 so that it overrides the original register_taxonomy function
    add_action( ‘init’, ‘custom_modify_taxonomy_args’, 11 );

    if(!defined( ‘WPNW_CAT’ ) ) {
    define(‘WPNW_CAT’, ‘niusy’); // Plugin post type
    }

    i have just made a test and if i change numbers to for example 9 it works, so only deacrasing works, increasing not workin:>

    i dont know why but it is strting finally to cooperate πŸ˜‰

    Plugin Author Idenovasi

    (@idenovasi)

    Do you use a cache plugin? When you change the number, it might be cached by the plugin.

    yes now i think it could be caching. btw any chances for developing this for example an option for showing in which categories is article?

    i have seen also https://wordpress.org/plugins/recent-posts-widget-extended/
    code for display also categories of post would be nice
    i think cat=”” does not work paraemeter i have category with id 4 and with slug jaszczurki and i cannot fetch data by cat=”4″ or cat=”jaszczurki”

    also option ti display only sticky would be nice πŸ™‚ now you can only ignore them.

    • This reply was modified 1 month, 2 weeks ago by donPablo.
    • This reply was modified 1 month, 2 weeks ago by donPablo.
    • This reply was modified 1 month, 2 weeks ago by donPablo.
Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.