How can I override a plugin file?

Webmaster Forums, Forum Promotion, SEO, Domain Names, Hosting & More!

AdminBrave is a community with useful content and resources. Connect with fellow webmasters. Grow your network. Stay informed. Learn and share with us!

B

Brave

Valued Member
Joined
Aug 29, 2021
Messages
44
Reaction score
0
Points
0
I am using a plugin that simply adds some data to posts but I have modified it's file to extend it's functionality but whenever I update my changes are lost, So how can I always override files like php/js or css? any ideas..
 
admin

admin

Community Leader
Joined
Aug 2, 2019
Messages
1,976
Reaction score
105
Points
63
@LogIn There are options to add custom CSS and JS through Admin Dashboard in WordPress.

I think custom JS is a separate plugin while custom CSS option is readily available.

I will check and update about PHP files. They are meant to be lost while updates are added. Unless you add them as a new template ( I guess ).

 
B

Brave

Valued Member
Joined
Aug 29, 2021
Messages
44
Reaction score
0
Points
0
@Abhi Thanks but I want to override as after update, I seen that my changes are reverted back.

> @admin There are options to add custom CSS and JS through Admin Dashboard in WordPress.

I know that but I want to override PHP file so that I can extend functionality.
 
Abhi

Abhi

Valued Member
Joined
Jan 21, 2020
Messages
4,396
Reaction score
110
Points
63
> @LogIn but I want to override PHP file so that I can extend functionality.

I get it. Will try to update soon.
 
B

Brave

Valued Member
Joined
Aug 29, 2021
Messages
44
Reaction score
0
Points
0
@"[unknown]"#p6366 I know about ChildTheme and the plugins solution you shared is not a good one but Thank you it helped me temporarily I want something like permanent solution there is only one file I need to keep the same and other I want to update and it's very hard to maintain the fork myself of bigger plugins.
 
Last edited:
Abhi

Abhi

Valued Member
Joined
Jan 21, 2020
Messages
4,396
Reaction score
110
Points
63
Those solutions say that you will have to fork the plugin and update the code changes in that plugin. There is no ready to use child plugin option available in WordPress.

I will see whether I can find a workaround.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

AB Paperboy
Replies
0
Views
19
AB Paperboy
AB Paperboy
AB Paperboy
Replies
0
Views
25
AB Paperboy
AB Paperboy
Abhi
Replies
2
Views
173
Teg
Teg
V
Replies
3
Views
231
admin
admin
Top