• Resolved crooy3

    (@crooy3)


    I’m creating a child theme for my WordPress website and I’m using WP Club Manager plugin. At some point I realized that I need to change class-wpcom-widget-fixtures.php inside includes/widget folder.

    How to override that file with new file inside my child theme. Where to put that new file?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Leon

    (@leonterry)

    Hi crooy3,

    Are you sure you want to change the entire class? What are you trying to change?

    Thread Starter crooy3

    (@crooy3)

    Hi Leon

    Well I don’t need to change the entire class for my first problem.
    I wanted to remove <ul class=”wpcm-matches-widget”>

    But for second problem I think I would need change the entire class. It is because I want to create new widget (called “Next Game Widget”). Here I need a brand new Widget.

    Plugin Contributor Leon

    (@leonterry)

    Ok, well you can change the <ul class=”wpcm-matches-widget”> by adding a filter like so:

    add_filter( 'wpclubmanager_before_widget_fixtures', '<ul class=”wpcm-matches-widget”>', 99 );

    and the closing ul:

    add_filter( 'wpclubmanager_after_widget_fixtures', '</ul>', 99 );

    Change the second parameter to your desired output and add to your theme’s functions.php

    If you really need to make changes to the class then you are better off creating a new widget. You can copy the existing class, rename it and add it to your child theme. Then in your functions.php make sure to include the new class file and register your new widget.

    I hope that helps ??

    • This reply was modified 6 years ago by Leon.
    • This reply was modified 6 years ago by Leon.
    Thread Starter crooy3

    (@crooy3)

    Thank you, that helps me a lot ??

    Thread Starter crooy3

    (@crooy3)

    Just one last question. How to manage thumbnails sizes?

    $badges = wpcm_get_match_badges( $post, 'crest-medium' );

    I have that ‘crest-medium’ size and that makes me a lot of trouble. I can’t find where that sizes are definied.

    Plugin Contributor Leon

    (@leonterry)

    Cool, I’m glad that helped.

    You can use ‘crest-large’, ‘crest-medium’ or ‘crest-small’ which are set at 100×100, 50×50 and 25×25 pixels respectively with no hard crop.

    Or you can use the new ‘club-thumbnail’ or ‘club-single’ size and where you can set the size and crop you require in Club Manager > Settings > Clubs.

    Hope that helps ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Override includes files’ is closed to new replies.