This is my first plugin that i am developing. I have only one file in my plugin folder which has all the code that is handling my admin part. I have my own custom tables. I'm not using any wordpress table for it.
Structure:
plugin/amt
- amt.php (This file has all the code which is dealing with admin part)
- js/amt.js
Now I have got amt.php file working for my admin part. It is retrieving and saving data into the database. Till here its all fine.
Now, I want to add some functionality in the plugin which will be shown on frontend of the website. Please guide me, how can this be done? I could think of following options:
- Add front end code in amt.php as well and use some kind of short code to display on front end of website under 'Sample Page'.
- Need to create a new folder/file for front end?
I'll be thankful if some one can guide me please.
add_shortcode( 'clan', 'clan_fn' ); function clan_fn() { }
Create a new page from word press admin and simply call the short code as below and it will display what ever functionality you add in clan_fn.[clan]
– Bilal Ahmad