• In API section on the plugin’s main page I found:

    BEAUTIFUL_FILTERS_INFO_POSTCOUNT
    $postcount_paragraph is the default postcount string. You MUST add %d somewhere in the new string in order for the resulting number to appear.

    function modify_filterinfo_postcount($postcount_paragraph){
    
        return 'Hej v?rlden ';
    
    }
    add_filter('beautiful_filters_info_postcount', 'modify_filterinfo_postcount');

    I tried

    return 'Hej v?rlden %d';

    And it printed “Hej v?rlden %d” to the page, rather than “Hej v?rlden 24” or whatever number of posts were the result of filtering.

    What am I missing?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Susan,

    You’re right.
    Looking at the code I’ve made the mistake of putting the sprintf inside the apply_filters.

    <p class="beautiful-taxonomy-filters-postcount"><?php echo apply_filters( 'beautiful_filters_info_postcount', sprintf( __( 'Result of filter: %d', 'beautiful-taxonomy-filters' ), $wp_query->found_posts ) ); ?></p>

    Needs to be fixed!

    Thread Starter Susan Langenes

    (@susanlangenes)

    Ok cool! Thank you! I’ll patiently await fix. ??

    Great to find this. I was just about to report the same problem (and suggest a similar solution)

    Yes, and your solution works.

    Plugin Author Jonathandejong

    (@jonathandejong)

    Had totally forgotten about this during my time off :O
    Thanks for the reminder Anita

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change text “Result of filter”’ is closed to new replies.