Тёмный

WordPress Plugin Development Part 2 | How To WordPress Development Tutorial 

Joshua Herbison
Подписаться 11 тыс.
Просмотров 51 тыс.
50% 1

#wordpressTutorial #wordpressPluginTutorial #wordpressDevelopment
WordPress Plugin Development step by step guide that follows my previous WordPress Plugin tutorial. In this WordPress Tutorial, I walk you through step by step in creating a WordPress admin menu, save a few options using the WordPress Codex to update a couple of options in the database and print those options to the page.
Download the Example file used in this series: idp.bz/plugin-s...
Please remember to subscribe for future videos. idp.bz/subscribe
Please see part 1 of the video at • WordPress Plugin Devel...
Visit the WordPress codex idp.bz/wordpres... for more functions that can be used in your plugin.
Send Business Correspondence to:
Idea Pro LLC or Joshua Herbison
2901 E Greenway Rd. #54171
Phoenix, AZ 85032

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 214   
@atisamshah694
@atisamshah694 3 года назад
Sir, you are a really amazing coder. You know how to deliver knowledge to others. Really enjoyed this video
@jherbison
@jherbison 3 года назад
Thank you.. Please subscribe and share it with anyone you think might benefit from it. Thank you for watching and commenting.
@rencee
@rencee 4 года назад
Thank you for the video. Steps are very easy to follow. Instead of Header and Footer scripts i used it to create shortcodes for contact information like address, phone, and email to reuse on different places of the website. Now i'm building on top of it, i'm looking for a way to add new fields from the plugin page itself.
@jherbison
@jherbison 4 года назад
Awesome... I can make a video about adding additional fields to it. Thank you for watching and commenting.
@rencee
@rencee 4 года назад
You're welcome Joshua. Looking forward to it! Thank you.
@Jalalx
@Jalalx 5 лет назад
Almost 17K views and just 312 likes? People should learn to support channels like this.
@jherbison
@jherbison 5 лет назад
Thank you. I really appreciate the comment. Yes, I like and subscribe to anyone that makes a video that I like.
@zeljkomiloradovic7491
@zeljkomiloradovic7491 4 года назад
Thanks mate!
@jherbison
@jherbison 4 года назад
You're welcome.. Thank you for the comment.
@2BearsWasTaken
@2BearsWasTaken 6 лет назад
I’m not well known with Wordpress myself, that is why I’m watching this. But I imidiatly stumble over the fact that even if it is behind an admin panel it still is a huge code injection vulnerability. For an example you can say this is okay but be warned and look into code injection here. You should not be printing JavaScript unless you are absolutely 100 percent sure of what you are doing. For a plug-in example you could’ve picked a way better and more save example in my opinion, A simpele hello world page would’ve been sufficient.
@jherbison
@jherbison 6 лет назад
Everyone does a hello world plugin, I use this as an example to get someone started. Thank you for your comments.
@logicalvaibhav
@logicalvaibhav 6 лет назад
Today I Develop My first Wordpress Plugin, Every One Should Watch This Video. Thank You
@jherbison
@jherbison 6 лет назад
Awesome! Thank you for the comment.
@omtechnologies8656
@omtechnologies8656 5 лет назад
Where were you buddy ! I am into PHP Development since last 12 years and Wordpress code was always intimidating me. Watched some videos and they make it so tough to understand this simple plugin development process... But u... You are a gem.
@jherbison
@jherbison 5 лет назад
Sweet! Yes, they make it seem much harder than it really is. All programming is that way. Seems harder than it is.
@nehalneema9410
@nehalneema9410 5 лет назад
@Joshua Herbison, please help me with the error, as I'm unable to find any Not able to see the textarea values on the site, on both header and footer in Wordpress 5.1 Here is the code : function learn_scripts_page() { //if($_POST['submit']){ if(array_key_exists('submit', $_POST)){ update_option('learn_header_scripts',$_POST['header_scripts']); update_option('learn_footer_scripts',$_POST['footer_scripts']); ?> Saved
@jherbison
@jherbison 5 лет назад
Your learn_scripts_page function that saves the information is not executing. You could also check the options table in the database and see that those options have not been added. You could add the following code under the closing } for the learn_script_page function: if(array_key_exists('submit',$_POST)){ learn_scripts_page(); } That code would execute the learn_scripts_page function on submit.. I would suggest changing the name of the submit button to something more unique... Like name="scripts_update_submit" and then change the if(array_key_exists('scripts_update_submit',$_POST)) Hope that helps.
@gracychristial4070
@gracychristial4070 3 года назад
function codeflash_scripts_page() { if (array_key_exists('submit_scripts_update', $_POST)) { alert('Hello! I am an alert box!!'); update_option('codeflash_header_scripts', $_POST['header_scripts']); update_option('codeflash_footer_scripts', $_POST['footer_scripts']); ?> Settings have been saved.
@jherbison
@jherbison 2 года назад
Sorry for the delay... I hope you found the solution.. alert() is not a php function. I am sure php is erroring out at that alert() function. I hope you found a solution for this.. Trying to go through all the comments that I have missed.
@pgcadd7983
@pgcadd7983 4 года назад
array_key_exists() expects parameter 2 to be array, null given in C:\xampp\htdocs\peoplecraft\wp-content\plugins\dummy plugin\index.php on line 35 how to fix this error
@jherbison
@jherbison 4 года назад
Can you post that line of code here?
@SpiritMeaning
@SpiritMeaning 2 года назад
I love the videos. Thanks a ton
@jherbison
@jherbison 2 года назад
Thank you for watching and commenting.
@shristichapagain6404
@shristichapagain6404 4 года назад
Can anyone help me.. I am very new to wordPress and php and I just copied the exact same code as below: Update Scripts on header and footer But it doesn't show any Site Scripts in the sidebar in dashboard. Any suggestions would be highly appreciated!!
@jherbison
@jherbison 4 года назад
Did you put the code in a plugin? Did you activate the plugin?
@shristichapagain6404
@shristichapagain6404 4 года назад
​@@jherbison Yes, I did!
@vebsensemedia8819
@vebsensemedia8819 4 года назад
Thanks Joshua Herbison for creating simple plugin development video. I am trying to new develop plugin, but a error irritate me. Error " Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'certificate-scripts_pages' not found or invalid function name in C:\xampp\htdocs ews\wp-includes\class-wp-hook.php on line 287 ". code : add_menu_page('Certificat Issue Setting','Certificate Options','manage_options','certificate-admin-menu','certificate-scripts_pages','',200); I am new in wordpress plugin development. Please help me
@vebsensemedia8819
@vebsensemedia8819 4 года назад
thanks sir, But I solved this issue, after one hr R&D.
@jherbison
@jherbison 4 года назад
Thank you for the comment. I would need to see more of the code. Send me an email to josh@ideapro.com
@luisrenelopezhernandez4318
@luisrenelopezhernandez4318 4 года назад
WordPress the worst php nightmare, laravel is the only reason why php is still alive there outside.
@jherbison
@jherbison 4 года назад
I like laravel, but not sure why WordPress is a nightmare and why some don't like it. In your opinion, what makes Laravel so much better than WordPress?
@philips4123
@philips4123 3 года назад
what does get_option do? also i kinda understand the array_key_exists checks for values submitted by the form/?
@jherbison
@jherbison 3 года назад
In the wordpress database is a table for options. Options are basically settings throughout the site. Options can be autoloaded when wordpress loads without you having to query for the option. get_option using a key, gets that option from the database. I hope that makes sense. Thank you for watching and commenting.
@philips4123
@philips4123 3 года назад
@@jherbison Thanks makes sense
@kirilltyrov8791
@kirilltyrov8791 5 лет назад
Great video, it's very helpfull. Can you create new video about using custom sql queries to own created database tables in Wordpress, thank you
@jherbison
@jherbison 5 лет назад
Thank you for the comment.. Yes, I will start making some new videos about doing custom queries.
@tonybennett9500
@tonybennett9500 4 года назад
Excellent video thank you for you efforts. I've have one issue when using this to add in my Google Analytics scripts, these functions are adding an extra back slash \ every time my 'UPDATE SCRIPTS' button is clicked. i.e. This is the google script an extra back slash after the equals of the src parameter as well as a few others? I can't see where they are coming from?
@tonybennett9500
@tonybennett9500 4 года назад
I've figured out the issue, this is what I done incase anyone else is having the same issue. I wrapped retrieving the $_POST data in 'stripslashes' i.e. stripslashes($_POST(['header-script']) - Worked for me.
@jherbison
@jherbison 4 года назад
Nice.
@jherbison
@jherbison 4 года назад
Glad you were able to figure it out.. Thank you for watching and commenting..
@AP-ei4jt
@AP-ei4jt 3 года назад
You are the best at simplifying the plugin dev process. Kudos!
@jherbison
@jherbison 3 года назад
Thank you! Thank you for watching and commenting.
@V3ritas1989
@V3ritas1989 3 года назад
why is it automatically adding \ in front of " and ' ??
@jherbison
@jherbison 2 года назад
I hope you found a solution for this. It is escaping any single or double quotes as those are used in development. Thank you for watching and commenting. I well add this to the list of videos that I need to make.
@Magistrado1914
@Magistrado1914 3 года назад
Excellent course 06/06/2021
@jherbison
@jherbison 3 года назад
Thank you for watching and commenting.
@leonzeng4139
@leonzeng4139 6 лет назад
I don't understand the "wp_head", "wp_footer". It says "Fire the 'wp_footer' action. ". Why do we need search for the scripts in the source code , but not on the page. How do we check the event name which fires an action. May we get a list on wordpress?
@jherbison
@jherbison 5 лет назад
The WordPress codex provides a list. Just do a search for add_action WordPress in Google.
@frypun3785
@frypun3785 4 года назад
why dont you give the code? I have an error and I cant double check.
@jherbison
@jherbison 4 года назад
Thank you for the comment. One of the reasons I don't give the code is because you learn better by typing it yourself. If you tell me and the community the issue that you are having, we are probably able to help you with the issue. Turn on debugging and post the error.
@frypun3785
@frypun3785 4 года назад
@@jherbison Hi Joshua, after debugging for some time, I had an extra auto generated by VSC. Thank you for the response though! Subscribed! Love your development videos!
@bazookajoe965
@bazookajoe965 4 года назад
Where is the source code available ?
@jherbison
@jherbison 4 года назад
The full file is available on part 4 of the plugin development.
@eralperera2764
@eralperera2764 2 года назад
super explanation and easy to understand thank you very much!
@TherealEmemay
@TherealEmemay 3 года назад
This is rwally usefull for me
@jherbison
@jherbison 3 года назад
Awesome.. Thank you for watching and commenting.
@RussDnB
@RussDnB 4 года назад
I'm doing something slightly different, but your guidance has helped me get somewhere I'd have spend multiple days on trying to find the solution on my own, thank you.
@jherbison
@jherbison 4 года назад
Awesome.. I have been that person spending days trying to figure things out... Been there so many times.. Good luck and thank you for the comment.
@TherealEmemay
@TherealEmemay 3 года назад
Really thank you men
@jherbison
@jherbison 3 года назад
Thank you for watching and commenting.
@bloggerhutt
@bloggerhutt 4 года назад
awsome! thank you so much. such a nice tutorial.
@jherbison
@jherbison 4 года назад
Thank you for the comment and complement.
3 года назад
Hello Joshua, thanks for publishing this great tut. It really helped me a lot. Thank you for simplifying things out. I thought this was hard and complicated.
@jherbison
@jherbison 3 года назад
Awesome. Thank you for commenting and watching.
@sebastiannieroda9022
@sebastiannieroda9022 5 лет назад
Great wideo , but i would also like to see how to save value from input type=checkbox , and imo You should show how to retrieve values and use it on frontend. Please Joshua, show it!
@jherbison
@jherbison 5 лет назад
Thank you for the comment and suggestion. I will put it on the list.
@pheasa4032
@pheasa4032 4 года назад
you are my teacher
@jherbison
@jherbison 4 года назад
Thank you for watching and commenting..
@xuananh4724
@xuananh4724 5 лет назад
Thanks you!! Can you add video instruct use vuejs (cli 3) to buid plugin wordpress .
@jherbison
@jherbison 5 лет назад
Not sure what that is.. Thank you for the comment.
@claudiacaron2931
@claudiacaron2931 2 года назад
Once again, great video, Josh. You cover admirably critical topics that is often left out by others. If one wants to customize their website, he/she is forced to spend significant money on pro features. Your videos help those who want to own their personalization. Thank you. !
@jherbison
@jherbison 2 года назад
Thank you so much!! Glad to hear that..
@cryswerton-silva
@cryswerton-silva 3 месяца назад
Very helpful.
@rollerjackson4986
@rollerjackson4986 6 лет назад
Good tutorial sir RESPECT from my side too , can u update me with plugin to add upload image settings in user menu page of admin dashboard. When user edit in uername label, he should able to upload profile picture .Its plugin about gravatar. (Now user can upload image through gravatar only.)Please help me if u can come up with some ideas ;will be really appreciated sir.
@jherbison
@jherbison 6 лет назад
Thank you for the comment and request. I will add it to the list of videos, but not sure when I will be able to make that video.
@9039504097
@9039504097 4 года назад
Thanks a lot, Joshua, its a great start video for plugin development. Thanks again, keep up the good work..!!
@jherbison
@jherbison 4 года назад
Thank you for watching and commenting.
@peihaochan4840
@peihaochan4840 4 года назад
Hi Josh, thanks for the great tutorial! But could I have a slight more in depth explanation as to what updating the footer/header scripts would do?
@jherbison
@jherbison 4 года назад
Yes, I will add it to the list of videos that I want make.
@nourmamyself1986
@nourmamyself1986 4 года назад
Hi Joshua, I'm loving your videos- thank you so much for making these available! I wonder if I'm misunderstanding something on this video. Watching it, it seems to show that the scripts should be inserted into the header (or footer) , but NOT visibly part of the header/footer (e.g. you don't want your google analytics stuff visible in the footer). However, my header and footer scripts end up visibly in the header and footer. Just to make sure that I didn't do something funny in my code, I downloaded your file and installed it, with the same result: the scripts that I add are visible as part of the header/footer on my site. Is it possible that my version of PHP does something different with the print statement? I'm running a MAMP localhost with php 7.4.2 on IOS. Thanks again!!
@nourmamyself1986
@nourmamyself1986 3 года назад
Replying to my own comment: I fixed it by putting tags around the print statement (and placing appropriate php open and close code in there)
@jherbison
@jherbison 3 года назад
Awesome! Please make sure what you are building is secure. I need to make some video on security..
@jeanpaulru
@jeanpaulru 6 лет назад
Thank you! Great explanation, easy to understand, friendly and interesting speech. Several questions please: how is your sublime text configured? ( please tell about ssh upload and wp syntax support, may be other useful stuff ). Please give link to your plugin zip.
@jherbison
@jherbison 6 лет назад
I will try to do a video of how to configure sublime with wbond.net SFTP.
@twicegamin
@twicegamin 4 года назад
Thanks for the awesome stuff! You really deserve more likes and subscribers.
@jherbison
@jherbison 4 года назад
Thank you. Please share the video with anyone that you think my find it useful. Again, thank you for watching and commenting.
@PLUS-sj4sf
@PLUS-sj4sf 3 года назад
Thanx a million Joshua, I was looking for these videos for months! Amazing!
@jherbison
@jherbison 2 года назад
Awesome.. Thank you for watching and commenting.
@KM_OwO
@KM_OwO 5 лет назад
honestly one of the best ASMR vids, also educational
@jherbison
@jherbison 5 лет назад
Thank you for the comment and compliment..
@homamhomam1879
@homamhomam1879 5 лет назад
I'm agreed with Web By VJ Everyone must watch this video thanks a lot
@jherbison
@jherbison 5 лет назад
Thank you!
@StanleyBateswar
@StanleyBateswar 4 года назад
Nice man! Thanks for sharing your knowledge
@jherbison
@jherbison 4 года назад
You're welcome.. Thank you for watching and commenting.
@leonzeng4139
@leonzeng4139 6 лет назад
if(array_key_exists('submit_scripts_update',$_POST)) never happen, why? the submit line is :
@jherbison
@jherbison 6 лет назад
Could be many issues. I would try to remove all fields in the form and print_r($_POST); and see if you get a print out of the array. If so, then one of your fields is conflicting with something. If you called one of your fields name="name" for example, that would cause wordpress to break!
@leonzeng4139
@leonzeng4139 6 лет назад
Thanks. I'm sorry that I lost the line "" Now it ok.
@jherbison
@jherbison 6 лет назад
Perfect.. I am glad you found the issue. Yes, having the starting form line is very important.. ;-)
@sntechideas1134
@sntechideas1134 5 лет назад
Good evening sir, now solved my problem. Thanks for valuable wordpress tutorial series.
@jherbison
@jherbison 5 лет назад
Thank you.
@aktaruzzaman849
@aktaruzzaman849 3 года назад
Hi, nice tutorial. Thank you! However I have a question. Will those field take actual scripts as input?
@jherbison
@jherbison 3 года назад
Yes, they will output anything that you put in this.. I did this only as an example of what can be done. It is important to make sure what you are doing is secure.
@aktaruzzaman849
@aktaruzzaman849 3 года назад
@@jherbison Thank you!
@JoeShockey
@JoeShockey 3 года назад
This is an excellent tutorial. At the end you mention “in the next video I’ll go into detail on how to add a sub-page to this menu option.” I couldn’t find adding menu sub-pages. Did I miss it or did you not do it?
@jherbison
@jherbison 3 года назад
I do have a video about adding a sub-menu page, but it isn't in this series. I think it may be this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-gx3WE3BksT0.html Thank you for watching and Commenting.
@JoeShockey
@JoeShockey 3 года назад
@@jherbison Thanks! I found it shortly after posting the question -- I should have gone back and edited my question. Thanks again for this excellent series!
@HowardLeeHarkness
@HowardLeeHarkness 4 года назад
I tried to duplicate what you had (including the corrections), but at 15:29, the entries in the text areas just disappeared when I clicked on UPDATE SCRIPTS, and the two variables were just null. Is there some update to WP or PHP in the last 2 years that broke that? I double-checked everything that you had on the screen. Is there a downloadable copy of this plugin that I can compare with mine?
@HowardLeeHarkness
@HowardLeeHarkness 4 года назад
Nevermind... DOH! I had a typo that I finally found. I think I need a better development environment, but for now I'm plodding along with NotePad++ and cPanel file upload.
@jherbison
@jherbison 4 года назад
Awesome.. Sublime works really well. Thank you for watching and commenting and glad you were able to figure it out.
@yatindraumrane7668
@yatindraumrane7668 5 лет назад
Thanks sir Good Job one question is if there is a pre-defined classes or function in the code please explain it
@jherbison
@jherbison 5 лет назад
Thank you, I try to keep it simple, as most people just want to be able to get stuff done.. I need to make more video that go deeper into each of the class or function. Explaining each in one video makes it really long. Thank you for the comment and suggestion.
@brentmarquez4157
@brentmarquez4157 5 лет назад
Thank you for the tutorial series, Joshua. Can anyone point me to a resource on how you get your development environment setup? It looks like the changes being made are updating live to a wordpress site online - how do you set up the environment on your local machine like it is in the video?
@jherbison
@jherbison 5 лет назад
Thank you for the comment.. You can install MAMP or XAMP depending on the computer that you are using. I actually have an older video about that so some things have changed but it is still the same setup. I would be happy to create a video tomorrow about this. What computer are you using Windows or Mac?
@brentmarquez4157
@brentmarquez4157 5 лет назад
@@jherbison Thanks for the reply. I am on a windows machine. I think a video would be helpful; a lot of the resources I found were either old, way too complicated or suggested 'one-click' solutions that I would be surprised worked smoothly.
@markaustin3950
@markaustin3950 6 лет назад
Great tutorial, found it super useful. You are able to break it down really well unlike other tuts out there. Just to add and by no means do I think this is the best way to do implement this but I found on line 63 when printing to DOM it only outputs the string of text you entered in the textarea field. If you do something like this on line 63 print (""); it will wrap it in script tags. Its the only thing I found missing from this tutorial. Saying that I am not 100% how secure this is.
@vahaggrigoruyan7228
@vahaggrigoruyan7228 5 лет назад
I got the same problem too
@jherbison
@jherbison 2 года назад
I hope you found a solution for this.. Trying to catch up on comments that I missed. Thank you for watching and commenting. If you haven't already, please check out my latest video: A Day In the life of a software engineer. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Z8GluDQ2U-E.html
@jherbison
@jherbison 2 года назад
I hope you found a solution for this.. Trying to catch up on comments that I missed. Thank you for watching and commenting. If you haven't already, please check out my latest video: A Day In the life of a software engineer. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Z8GluDQ2U-E.html
@miroslavgeorgiev5835
@miroslavgeorgiev5835 5 лет назад
Very good explanation, can we download the source code?
@jherbison
@jherbison 5 лет назад
Thank you. I will see if I can find the file and include a link to download it.
@HowardLeeHarkness
@HowardLeeHarkness 4 года назад
@@jherbison Did this fall through the cracks? I don't see any download link.
@phartech5481
@phartech5481 6 лет назад
Thanks You For Make This . I am From Cambodia . Videos So Clear
@phartech5481
@phartech5481 6 лет назад
Ok . Thanks You Brothers
@jherbison
@jherbison 4 года назад
Awesome.. Thank you...
@nemanjacvetojevic2290
@nemanjacvetojevic2290 5 лет назад
I have an issue here. When others plugins are installed, my new plugin wont show in dashboards, sidebar. I also changed number position to something unique and still have the same problem. Any advice?
@nemanjacvetojevic2290
@nemanjacvetojevic2290 5 лет назад
When i enter url of the plugin page it gives me message "Sorry, you are not allowed to access this page."
@jherbison
@jherbison 5 лет назад
Were you able to resolve this?
@sabaymusicofficial673
@sabaymusicofficial673 6 лет назад
Good Tutorial . Thanks Brothers
@sabaymusicofficial673
@sabaymusicofficial673 6 лет назад
Brothers .I love video I hope that finish I can make plugin myself
@sabaymusicofficial673
@sabaymusicofficial673 6 лет назад
Yes Bro .
@jabbergabber5190
@jabbergabber5190 6 лет назад
Just wanted to say thanks - just getting my head round wordpress plugins and this has been an excellent intro !
@jherbison
@jherbison 6 лет назад
Thank you for the comment.
@yoerho123
@yoerho123 6 лет назад
Thank You for your video, this video is really help me a lot !!
@jherbison
@jherbison 6 лет назад
I am glad it helped.. Thank you for the comment.
@vahaggrigoruyan7228
@vahaggrigoruyan7228 5 лет назад
Hey guys I need a little help, when I write a code in a fields of header and footer every time wordpress see a ' or " symbol it puts a \ symbol before them how can we fix that?
@jherbison
@jherbison 5 лет назад
You need to escape the string. You can echo the string using $str = addslashes('What does "yolo" mean?'); echo($str);
@vahaggrigoruyan7228
@vahaggrigoruyan7228 5 лет назад
@@jherbison thx
@RayHawthorne
@RayHawthorne 5 лет назад
Can try this also. PHP appears to have a stripslash function: update_option('footer_scripts', stripslashes($_POST['footer_scripts']));
@druidwtf
@druidwtf 5 лет назад
amazingly useful, great choice :D
@jherbison
@jherbison 5 лет назад
Thank you for the comment.
@stavroskefaleas6320
@stavroskefaleas6320 5 лет назад
What a great job sir! I have only one question! If I use the new Twenty Nineteen theme that comes with wordpress 5 both our input ('Header Scripts' and 'Footer Scripts') is appearing on the website front page! Does that mean than this new theme is not yet ready?
@jherbison
@jherbison 5 лет назад
I would need to see an example. I have not looked at the new theme, but it should not affect how that script works.
@stavroskefaleas6320
@stavroskefaleas6320 5 лет назад
@@jherbison I still get text output independently of the theme I use. Maybe it is a wordpress 5 core new feature? Here is a screenshot I took : serving.photos.photobox.com/247864037eb6eae8aa999185a7fb1e5c08796d9000399e7a6766c5ae29c2f2f0ea343998.jpg
@xtgamezg
@xtgamezg 5 лет назад
I am having the same problem
@jherbison
@jherbison 5 лет назад
If you are putting in standard text like your picture shows, it will output to the page. If you use an HTML tag like , , or it will not print out to the page but be hidden in the HTML code.
@muktasharma9514
@muktasharma9514 6 лет назад
i got an error when adding menu page Sorry, you are not allowed to access this page. when i am doing with the way you explained in tutorial can you please help :)
@jherbison
@jherbison 6 лет назад
I would need to see you code to understand what is going on.
@muktasharma5272
@muktasharma5272 6 лет назад
add_action('admin_menu','awesome_plugin_admin_menu_function'); function awesome_plugin_admin_menu_function() { add_menu_page('Add/Update header Footer Scripts','Header/Footer Scripts','manage_options','scripts','aswesome_scripts_add_function'); } function aswesome_scripts_add_function() { }
@jherbison
@jherbison 6 лет назад
It looks good. My only suggestion would be to change your slug 'scripts' to a longer more unique slug like 'awesome-scripts'. That could be causing and issue. Other than that, I am not sure why it would be giving you the error page.
@369-davian
@369-davian 4 года назад
nice cam, hi, from dominican republic
@jherbison
@jherbison 4 года назад
Thank you for watching and commenting.
@techtrickswithdj295
@techtrickswithdj295 6 лет назад
so clean explanation, like last one love that
@jherbison
@jherbison 5 лет назад
Thank you.
@rezaalimorady5010
@rezaalimorady5010 4 года назад
thank you for these awesome educations .
@jherbison
@jherbison 4 года назад
Thank you for the comment and compliment...
@PanCakeMixer101
@PanCakeMixer101 5 лет назад
Thankyou so much for these tutorials !
@jherbison
@jherbison 5 лет назад
You're welcome.. Thank you for the comment and compliment.
@leonzeng4139
@leonzeng4139 6 лет назад
at 6:12, it does not show Site Scripts menu, what's wrong?
@leonzeng4139
@leonzeng4139 6 лет назад
manage_option should be manage_options . I lost a letter s.
@jherbison
@jherbison 4 года назад
Glad you found the error.. Sorry for the delay in commenting..
@yashpatil2074
@yashpatil2074 5 лет назад
Great tutorial, thank you so much.
@jherbison
@jherbison 5 лет назад
You're welcome.. Thank you for watching and commenting
@rotbe1iha
@rotbe1iha 5 лет назад
Great Job , Thank You so Much
@jherbison
@jherbison 5 лет назад
You're welcome. Thank you for the comment and compliment.
@sevdamurat4455
@sevdamurat4455 6 лет назад
I really liked the way you tell things
@jherbison
@jherbison 6 лет назад
Thank you.. Thank you for the comment.
@sevdamurat4455
@sevdamurat4455 6 лет назад
Go on good work, by the way how old man?
@jherbison
@jherbison 6 лет назад
How old am I?
@86wiesniak
@86wiesniak 6 лет назад
YOU ARE THE MAN!!! Thank You
@jherbison
@jherbison 6 лет назад
Thank you for the comment.
@BillClinton228
@BillClinton228 6 лет назад
Fantastic
@jherbison
@jherbison 5 лет назад
Thank you.
@bharathism6757
@bharathism6757 6 лет назад
end of the video you will show the header and footer scripts in page source but I can't, what was the issue in that? please suggest me
@jherbison
@jherbison 6 лет назад
That was just an example of how the function prints it to the page. If you followed the video correctly, you should have been able to see the text you added in the boxes when you view the source.. You can always send the code to me at josh@ideapro.com and I can take a look at what was done.
@bharathism6757
@bharathism6757 6 лет назад
hmm i will send code
@bharathism6757
@bharathism6757 6 лет назад
Mr.Josh i sent the file please check it and tell the solutions thank you
@bharathism6757
@bharathism6757 6 лет назад
Hi Josh I found out the solutions I have given the sm_head and sm_footer instead od wp_head and wp_header initially I thought it must be manual (like idea pro)prefix name. that it an issue
@jherbison
@jherbison 6 лет назад
Awesome. Yes, database changes from wp_ if you use a different prefix but the files remain the same.. wp_
@georgesmith3022
@georgesmith3022 6 лет назад
hi, i have a question, these options (header and footer scripts) are saved in some variables, so next time i visit the site will they still exist? Does the update_option save them in the database?
@jherbison
@jherbison 6 лет назад
Yes. update_option() function from the WordPress codex saves the information into the database under the wp-options (unless you changed the prefix) table.
@georgesmith3022
@georgesmith3022 6 лет назад
thanks for your prompt reply
@bhavanasingh7134
@bhavanasingh7134 6 лет назад
hii Joshua , i have a question ,where does this function update_option() is defined in wordpress?
@jherbison
@jherbison 6 лет назад
It is in the wordpress core functionality.. It is on this page of the WordPress core, wp-includes/option.php
@bhavanasingh7134
@bhavanasingh7134 6 лет назад
Thanks for your reply
@webwolffy
@webwolffy 6 лет назад
Will you be making a part 3? You are a great teacher, please don't stop.
@webwolffy
@webwolffy 6 лет назад
Yes some kind of form or contact form.
@kannang.b8745
@kannang.b8745 6 лет назад
Nice tutorial. Thank you.
@jherbison
@jherbison 5 лет назад
Thank you.
@int5tech
@int5tech 6 лет назад
when do you upload 4th tutorial?
@int5tech
@int5tech 6 лет назад
Thanks for your fast reply. actually i am new in wordpress. i want to learn more..
@jherbison
@jherbison 2 года назад
Trying to catch up on comments that I missed. Thank you for watching and commenting. If you haven't already, please check out my latest video: A Day In the life of a software engineer. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Z8GluDQ2U-E.html
@jherbison
@jherbison 2 года назад
Thank you.
@kulvindersingh2738
@kulvindersingh2738 6 лет назад
Thanks
@jherbison
@jherbison 6 лет назад
Thank you..
@kulvindersingh2738
@kulvindersingh2738 6 лет назад
Hi Joshua, I tried your code to add options in left menu. Until we declare and define the callback function "ideapro_scripts_page", the Wordpress will keep throwing the callback error to us, not sure how does it worked for you and showed a blank page?
@izahsalleh3883
@izahsalleh3883 6 лет назад
This error appeared at Site Script : Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'ideapro_scripts_page' not found or invalid function name in D:\xampp2\htdocs\wordpress\wp-includes\class-wp-hook.php on line 286. HOW TO SOLVED IT? TQ
@sevdamurat4455
@sevdamurat4455 6 лет назад
define a function called: "ideapro_scripts_page". You either not defined a function or it is not reachable by call_user_func_array
@ama_cactus
@ama_cactus 5 лет назад
Hey, I ran into the same error... I was using $POST instead of $_POST check your code
@AZAGamingTR
@AZAGamingTR 5 лет назад
@@sevdamurat4455 Merve aynı hatayı alıyorum nasıl çözebilirim
@jherbison
@jherbison 2 года назад
I hope you found a solution for this.. Trying to catch up on comments that I missed. Thank you for watching and commenting. If you haven't already, please check out my latest video: A Day In the life of a software engineer. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Z8GluDQ2U-E.html
@jherbison
@jherbison 2 года назад
Thank you for responding.. Trying to catch up on comments that I missed.
@husseinhusseiney9487
@husseinhusseiney9487 4 года назад
Hello thanks for the tutorial. I am getting a error from wordfence when i try to insert a code inside of header and footer text area 403 Forbidden A potentially unsafe operation has been detected in your request to this site. what to do?
@jherbison
@jherbison 4 года назад
Thank you for watching and commenting. Based on you more recent comments, I assume that you figure this out.
@climax1233
@climax1233 4 года назад
Don't brake the keyboard my Friend it sounds dangerous while you are typing ;)
@jherbison
@jherbison 4 года назад
Climax 123 yeah, the 2017 MacBook Pro keyboard was sound loud when it was as new. Also, my mic wasn’t working so it was the computer mic for this video. The keyboard got quieter as the computer got older, but the keyboard also stopped working after 14 months.
Далее
Шоколадная девочка
00:23
Просмотров 129 тыс.
How to create a WordPress Gutenberg Custom Block
42:09
Create a WordPress Plugin from Scratch - Part 1
12:22
Просмотров 400 тыс.
13 Things To Remove From Your Website Immediately
12:33
Wordpress vs coding - why devs SHOULD learn Wordpress
11:03