I am facing an issue. my plugin is installed and enabled perfectly. but not working.
AI-generated summary
A user is seeking help with a custom plugin for creating a custom header, which is not working despite being installed and enabled. Shatabdi_Dash explains the plugin is for a dev install and shares code and screenshots. JammyDodger, Canapin, and merefield suggest using a Theme Component instead, as it’s simpler and more appropriate for such tasks. RGJ identifies specific issues in the plugin code, such as incorrect file paths and unnecessary JavaScript registration. After corrections, the plugin works, but the user expresses a need for a plugin over a theme component for a live session. The discussion concludes with the user sharing the code on GitHub and receiving further feedback, including a note about repository structure and a redirect to another topic for continued discussion.
Can you go into a little more detail? What plugin are you trying to install, and what steps have you taken so far?
I am creating a custom header plugin. But its not working
My installation javascript coding is done.
How can I enable my plug in. I didnt get where is the issue.
If you’re creating a custom one then you may want to go into even more detail about what you’re attempting to do. Is this on a dev install, or a live site? Do you know the plugin works?
Can you explain what you want to achieve with your plugin?
Did you consider creating a theme component, unless you need to have access to or do things for which a plugin is mandatory?
Ya I want a plugin that will create a custom header for me.
What features do you need? How will the header be customized? Can you be more detailed in your explanations so we can help better?
I cant make changes in the theme component I want a custom plugin for perform this.
![]()
I want a header like this.
You should only need a plugin if you are changing the API.
What here requires changes to the API?
If there are no changes to the API, a Theme Component should suffice.
But I want a plugin for this task. My plugin is not working. its installed and loaded successfully. but still its not working.
Why? There are no advantages to using a plugin for this task (as far as I’m aware). Theme Components are quicker and easier to install and update.
Ya I know. But is it not possible to create a plugin for this.
It is, but it’s not the best approach, that’s all.
Ya I know this is not the best approach. But I want to create a plugin.
kindly help me to debug it.
You’re trying to use a sledgehammer to crack a nut.
There is no need for a plugin, you can execute Javascript from a theme component, which is more easy.
There is no need for Javascript if you’re just writing out HTML to your header, you can just add it in Common - Header in your theme component.
Please share this code on GitHub or equivalent if at all possible, so we don’t have to download a file or collection of files from the internet in order to inspect and comment.
Ya sure I am adding the code in github.
https://github.com/shatabdidash/Plug-in
this is the link
Is this code having any issue ??
-
register_assetmust not include theassetsdirectory, just doregister_asset "stylesheets/..." -
the css file name starts with a space so it is not found
-
no need to register js files

