Home Forums WoodMart support forum Need to Overwrite “class-widget-recent-posts.php” widget with my custom code.

Need to Overwrite “class-widget-recent-posts.php” widget with my custom code.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #490186

    justinterweb
    Participant

    I need to overwrite “class-widget-recent-posts.php” because there is no way you can add a category to the recent post widget. I tried to create the same folder structure in the child theme but it’s not working.

    <?php if ( woodmart_loop_prop( ‘parts_meta’ ) && get_the_category_list( ‘, ‘ ) ): ?>
    <div class=”recent-posts-cat”><?php echo get_the_category_list( ‘, ‘ ); ?></div>
    <?php endif ?>

    Let me know how I can add the above code after the post title or date.

    Attachments:
    You must be logged in to view attached files.
    #490354

    Luke Nielsen
    Keymaster

    Hello,

    Unfortunately, our widget cannot be overridden via a child theme. Basically, customers just make a new one and plug it in.

    Thanks for your time and have a great day.

    Kind Regards

    #490395

    justinterweb
    Participant

    So are you saying there is no way we can tweak the recent posts widget?

    #490400

    Luke Nielsen
    Keymaster

    Hello,

    Our “Recent Posts” widget cannot be overridden via the child theme. You can use the default widget from WordPress and customize it or use some plugins for showing categories in the default “Recent Posts” widget.

    Kind Regards

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