F
F
foxayb2018-03-22 22:58:42
WordPress
foxayb, 2018-03-22 22:58:42

How to edit a wordpress plugin so that it doesn't crash after the next update?

There is a plugin responsible for displaying posts. I made some changes to the corresponding file regarding the display of posts.
That's just after updating the plugin - it overwrites this file and my adjustments are replaced with standard ones. How to properly approach this moment so that the adjustments remain?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
E, 2018-03-22
@foxayb

Something tells me that pre_get_posts is used there. if so, try to get hooked there, and don't touch the plugin at all. Or if there is just a custom query like WP_Query, then you need to think deeper.
Can you post a piece of code for this plugin?

A
Andrey Gluk, 2018-03-23
@WPMaster

Create a custom theme and copy the modified plugin files into it. No tricks are needed here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question