add_menu_page_1Memposting bagaimana cara menambahkan menu page pada wordpress. Jika anda bingung pada bagianmana yang dimaksudkan, sedikit penjelasan sebagai berikut. add_menu_page codex biasanya digunakan untuk mengcustom menu pada wordpress yang berada pada sebelah kiri dashboard anda. Nah jika anda ingin menambahkan menu sendiri ada sedikit tutorial yang saya share.

Sebelum menambahkan codex beberapa yang harus diketahui dari susunan codex add_menu_page.

<?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); ?>

dari codex diatas akan saya jelaskan parameternya.

  • $page_title = (string) (wajib) Teks yang akan ditampilkan dalam tag judul halaman, jika menu tersebut dipilih.
  • $menu_title = (string) (wajib) Teks yang nantinya akan muncul pada layar untuk nama menu anda.
  • $capability = (string) (wajib) Kemampuan yang diperlukan untuk menu ini akan ditampilkan kepada pengguna . Tingkat pengguna sudah ditinggalkan dan tidak HARUS digunakan di sini ! (mengatur kepada user siapa saja nantinya menu ini akan tampil).
  • $menu_slug = (string) (wajib) Nama ini merujuk pada menu ini (harus unik) untuk menangani tampilan konten halaman menu.
  • $function = (string) (optional) Nama function yang akan menampilkan konten halaman untuk halaman menu tersebut.
  • $icon_url = (string) (optional) Untuk menampilkan icon pada menu tersebut.
  • $potitions = (integer) (optional) Mengatur pada posisi urutan mana menu akan muncul. Jika diabaikan maka menu akan muncul pada urutan bagian bawah sendiri.

Nah dari beberapa penjelasan diatas sekarang kita terapkan dalam wordpressnya.

  1. Masuk kedalam Appearance -> Editor
  2. Pilih pada bagian kanan yaitu Function.php
  3. Tambahkan pada paling bawah script berikut. (Kenapa bagian bawah agar lebih mudah di dalam pencarian script kembali jika terjadi kesalahan penulisan).
    Tambahkan script berikut lalu simpan.

    add_action(‘admin_menu’, ‘custom_add_page’);

    custom_add_page : merupakan variabel nama function, bisa anda sesuaikan sesuai dengan nama function yang anda buat nantinya.Nah dari penjelasan parameter saya diatas contoh penulisan sebagai berikut.

    function custom_add_page() { add_menu_page(‘mn’, ‘Menu’, ‘edit_themes’, ‘teks-tampil’, ‘ini_test_menu’,get_bloginfo(‘template_directory’).”/images/text.png”,3); }

    get_bloginfo(‘template_directory’) : merupakan url alamat template yang aktif.
    teks_tampil: merupakan nama function yang saya buat untuk memanggil file php. Seperti dibawah ini.

    function teks_tampil(){ include(‘test.php’); }

  4. Buat file baru dengan nama lain. (misal : test.php ) simpan dalam folder template yang anda gunakan.

    <?php echo “test”; ?>

  5. Pada file test.php ini nantinya yang akan tampil ketika anda memilih menu tersebut. Pada contoh maka ketika menu yang dibuat tadi di pilih akan muncul tulisan test.
  6. Jika anda ingin mengedit silahkan sesuaikan dengan kebutuhan anda.
  7. Selamat Mencoba. 😀
add_menu_page WORDPRESS

You May Also Like

92 thoughts on “add_menu_page WORDPRESS

  1. In these days of austerity as well as relative stress about taking on debt, many individuals balk up against the idea of utilizing a credit card to make purchase of merchandise and also pay for a vacation, preferring, instead to rely on the particular tried plus trusted procedure for making transaction – hard cash. However, if you possess the cash on hand to make the purchase 100 %, then, paradoxically, that’s the best time to use the credit card for several factors.

  2. A lot of thanks for all your valuable efforts on this website. Kim takes pleasure in getting into internet research and it is easy to understand why. We hear all regarding the compelling form you deliver very important things on the website and therefore invigorate participation from some others about this subject matter so our own princess is now starting to learn a lot. Have fun with the remaining portion of the new year. You are performing a good job.

  3. My spouse and i got quite fortunate when John managed to complete his investigation through your ideas he discovered from your own site. It’s not at all simplistic just to possibly be handing out tricks which often many others could have been trying to sell. And now we see we now have the website owner to be grateful to for this. All of the explanations you made, the easy site menu, the friendships your site assist to promote – it is mostly wonderful, and it’s making our son in addition to our family feel that the concept is awesome, which is certainly very indispensable. Many thanks for all!

  4. I needed to write you this very small note in order to give many thanks again for those fantastic information you’ve discussed on this site. It was so incredibly open-handed with people like you to grant openly all that many people might have advertised for an e-book to help make some cash on their own, primarily given that you could have tried it in the event you desired. Those secrets additionally worked to become great way to know that most people have the same eagerness like my own to find out very much more when considering this matter. I’m sure there are a lot more pleasurable situations up front for people who take a look at your blog post.

  5. I enjoy you because of your own hard work on this website. My aunt take interest in managing investigation and it’s really easy to see why. I notice all regarding the lively way you render advantageous ideas through this web blog and welcome participation from some other people on the matter so our own daughter has always been starting to learn so much. Take pleasure in the rest of the new year. You have been performing a really good job.

  6. I have to show my appreciation for your kindness supporting people that absolutely need guidance on this important subject. Your special dedication to getting the message all over came to be particularly powerful and has all the time enabled guys and women much like me to achieve their targets. Your entire valuable instruction implies a lot a person like me and substantially more to my fellow workers. Thanks a lot; from everyone of us.

  7. Thanks so much for providing individuals with an extremely special chance to read in detail from this web site. It is always very kind and packed with a great time for me personally and my office fellow workers to visit your web site particularly thrice weekly to read the new stuff you have. And lastly, we’re always satisfied concerning the powerful methods you serve. Certain two points on this page are without a doubt the simplest we have had.

  8. My husband and i have been quite relieved when Ervin managed to do his survey because of the ideas he gained through your weblog. It’s not at all simplistic to just find yourself handing out things which many people may have been making money from. Therefore we understand we have the blog owner to thank because of that. The entire illustrations you’ve made, the easy website menu, the relationships you aid to create – it’s mostly powerful, and it’s really letting our son and our family reason why that theme is amusing, and that is tremendously important. Many thanks for all the pieces!

  9. My wife and i ended up being now delighted Albert managed to finish up his investigations using the precious recommendations he grabbed from your own web site. It’s not at all simplistic to simply choose to be releasing steps which some others have been selling. So we fully understand we have the writer to appreciate for that. The specific explanations you’ve made, the straightforward web site menu, the relationships your site help to engender – it’s everything awesome, and it’s letting our son in addition to the family believe that this subject is interesting, which is very fundamental. Thank you for all the pieces!

  10. I’m just commenting to make you know what a brilliant encounter our daughter enjoyed visiting your blog. She learned numerous issues, which include what it is like to have an awesome helping mood to get many more very easily understand chosen tricky subject areas. You really surpassed visitors’ desires. Thank you for supplying these warm and helpful, trusted, explanatory and in addition unique tips about your topic to Jane.

  11. Good post. I learn one thing more challenging on totally different blogs everyday. It will always be stimulating to learn content from other writers and follow a little bit one thing from their store. I抎 desire to use some with the content on my weblog whether or not you don抰 mind. Natually I抣l offer you a hyperlink on your net blog. Thanks for sharing.

  12. I not to mention my buddies were found to be analyzing the excellent techniques from your website and so all of the sudden got a horrible suspicion I never thanked the web blog owner for them. All of the women had been as a result warmed to learn all of them and already have seriously been loving those things. Thanks for being simply accommodating and also for picking this form of very good resources millions of individuals are really desirous to know about. Our honest apologies for not expressing gratitude to you sooner.

  13. I just wanted to construct a note so as to appreciate you for some of the superb techniques you are showing at this website. My time consuming internet look up has at the end of the day been paid with awesome tips to go over with my friends. I would claim that many of us site visitors actually are really lucky to exist in a good website with so many marvellous people with very helpful hints. I feel truly grateful to have discovered your entire site and look forward to plenty of more fun times reading here. Thanks once again for all the details.

  14. I must show some thanks to this writer for rescuing me from this problem. Because of exploring throughout the search engines and finding ways which were not productive, I believed my life was gone. Being alive without the presence of solutions to the problems you have resolved through your article is a serious case, as well as the ones which may have in a wrong way damaged my entire career if I hadn’t discovered your blog. Your main ability and kindness in dealing with all the stuff was priceless. I’m not sure what I would’ve done if I hadn’t encountered such a solution like this. I can also at this moment look forward to my future. Thanks a lot very much for the reliable and amazing help. I will not hesitate to propose your blog post to anyone who would like guidance on this issue.

  15. Thank you for all your efforts on this web page. My mom really likes setting aside time for internet research and it’s really easy to understand why. All of us hear all relating to the lively means you render vital guides on your blog and as well improve contribution from other people on this article and our favorite simple princess is truly becoming educated a great deal. Take pleasure in the remaining portion of the year. You’re the one carrying out a brilliant job.

  16. A lot of thanks for all your labor on this website. My mum enjoys getting into investigation and it is obvious why. I notice all of the dynamic manner you deliver useful information on the web site and as well as increase participation from people on the subject then my daughter is really discovering a lot. Take advantage of the rest of the year. You are carrying out a fabulous job.

  17. I definitely wanted to develop a small message to be able to thank you for some of the pleasant tactics you are placing here. My particularly long internet search has now been compensated with awesome insight to talk about with my contacts. I ‘d suppose that we website visitors actually are rather fortunate to live in a fantastic site with so many wonderful professionals with insightful methods. I feel very fortunate to have discovered the web page and look forward to some more enjoyable moments reading here. Thank you once more for a lot of things.

  18. A formidable share, I simply given this onto a colleague who was doing just a little evaluation on this. And he the truth is bought me breakfast because I found it for him.. smile. So let me reword that: Thnx for the deal with! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love studying extra on this topic. If doable, as you turn into experience, would you mind updating your blog with extra particulars? It is highly useful for me. Massive thumb up for this blog post!

  19. I and my friends were taking note of the excellent solutions on your web blog then all of a sudden I had a horrible feeling I never expressed respect to you for them. All the women were for this reason thrilled to see all of them and have in effect quite simply been enjoying those things. Thank you for truly being quite helpful and also for figuring out this kind of fine areas most people are really desirous to learn about. Our sincere apologies for not saying thanks to sooner.

  20. Thank you for each of your work on this web page. My mum take interest in setting aside time for internet research and it’s easy to understand why. I notice all relating to the dynamic way you give practical secrets on this web blog and therefore attract response from some other people about this area so our girl is actually understanding a lot of things. Take pleasure in the rest of the new year. You’re carrying out a stunning job.

  21. I precisely wished to appreciate you all over again. I am not sure the things that I could possibly have created in the absence of these recommendations provided by you about this question. It previously was a real terrifying case in my position, but finding out the very specialized tactic you processed it took me to jump with contentment. I am happy for your guidance and thus pray you realize what an amazing job you’re undertaking instructing other individuals by way of your website. Probably you’ve never met all of us.

  22. I precisely wanted to thank you very much again. I’m not certain the things I might have created in the absence of the type of solutions documented by you concerning such field. Entirely was the intimidating difficulty in my view, however , seeing your expert mode you processed that made me to weep for joy. I am happy for this service and hope you realize what a great job that you’re undertaking instructing the others using your web page. I know that you have never encountered any of us.

  23. I needed to compose you this little bit of note to thank you as before for all the amazing thoughts you have shared here. This has been simply wonderfully open-handed with people like you to present freely precisely what a lot of folks could have supplied for an electronic book to get some dough for their own end, notably considering that you might well have done it in the event you decided. Those guidelines likewise served as a easy way to understand that the rest have the identical fervor much like my own to know a good deal more pertaining to this issue. I’m sure there are a lot more enjoyable occasions ahead for individuals that check out your blog.

  24. My wife and i got very contented when John could finish up his reports out of the precious recommendations he grabbed through your blog. It is now and again perplexing to simply continually be giving out procedures that many people might have been selling. Therefore we grasp we need you to be grateful to because of that. All of the explanations you made, the straightforward website menu, the relationships your site help to foster – it’s many extraordinary, and it is leading our son in addition to our family consider that the concept is entertaining, which is certainly quite mandatory. Thank you for everything!

  25. I want to show thanks to this writer for rescuing me from such a difficulty. Because of exploring through the world wide web and getting tricks which are not powerful, I figured my entire life was over. Living without the solutions to the problems you’ve solved through this website is a serious case, as well as the ones which may have in a wrong way affected my career if I had not come across your web site. Your good ability and kindness in maneuvering the whole lot was helpful. I’m not sure what I would have done if I had not come across such a solution like this. I can also at this time look forward to my future. Thank you so much for this high quality and amazing guide. I will not think twice to suggest the blog to any individual who will need counselling about this matter.

  26. An impressive share, I simply given this onto a colleague who was doing a bit of evaluation on this. And he in truth purchased me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the deal with! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If potential, as you turn out to be expertise, would you thoughts updating your blog with more details? It is extremely helpful for me. Large thumb up for this weblog put up!

  27. Thank you a lot for providing individuals with a very special chance to discover important secrets from this blog. It really is very cool and full of fun for me personally and my office mates to search your site not less than 3 times a week to learn the fresh guidance you have got. And indeed, I’m just certainly impressed for the magnificent tactics you serve. Certain 2 ideas in this posting are unquestionably the most effective I have had.

  28. I would like to convey my appreciation for your kind-heartedness for men and women that have the need for help on your concern. Your real dedication to passing the solution throughout came to be pretty helpful and has in most cases empowered girls much like me to reach their ambitions. Your amazing invaluable tips and hints denotes this much to me and substantially more to my office workers. Warm regards; from everyone of us.

  29. I truly wanted to post a small comment to thank you for those stunning tips you are showing on this site. My considerable internet look up has at the end of the day been rewarded with useful concept to go over with my neighbours. I ‘d assume that most of us website visitors actually are undeniably endowed to dwell in a fine place with so many marvellous professionals with interesting techniques. I feel very grateful to have used the weblog and look forward to many more amazing times reading here. Thank you once more for all the details.

  30. I simply desired to say thanks again. I do not know the things that I could possibly have undertaken in the absence of the type of tactics provided by you on that field. This has been a real scary problem in my view, nevertheless considering the expert way you solved that made me to leap for fulfillment. Now i am happier for your guidance and then expect you are aware of an amazing job you happen to be carrying out instructing people using your web page. Probably you have never got to know all of us.

  31. Hiya, I am really glad I have found this info. Today bloggers publish only about gossips and net and this is really frustrating. A good website with exciting content, that’s what I need. Thanks for keeping this web-site, I’ll be visiting it. Do you do newsletters? Cant find it.

  32. (Google Hearsay) – Easy Bleeding and Bruising. Your liver makes the things that assist your blood clot. When it’s damaged, it can’t on enough. You power start to bleed hands down and have torment stopping it. Or you clout ecchymosis easily. Admit your dentist or other doctors preceding the time when you secure any medical procedure. Treat cuts with pressure bandages and travel to the doctor proper away. In an pinch, you’ll get platelets to return what you forgotten and viagra without doctor prescription to avoid your blood clot.
    Updated: October 17, 2019 13:20

  33. (NY Times) – You may hamper the calories in a buy generic cheap viagra online, steps taken today and regular your body best index but too many of us don’t cognizant of the vigorousness estimation that could save our lives – blood pressure. Dubbed the unuttered lallapalooza, extraordinary blood albatross (BP) almost never has symptoms hitherto it causes 61% of strokes and 33% of heart attacks, according to Blood Press UK. It’s brainwork as diverse as 3 million people are undiagnosed and command exclusive muster up out theirs is too high when they contain a heart strike at or stroke.
    December 14, 2019 6:27

  34. The hornet’s nest is with your confederate, not YOU – It is very respected to have found out that it takes two to tango. Apropos 30% of infertile couples chance the trouble is in their corresponding male partners, whereas, tea 40% infertility factors are on both sides. Manful infertility symptoms are canadian drugs pharmacy less observable without getting a semen division done. This division measures the haleness of semen and sperm. So, advance a gain access to your mate thoroughly checked if you don’t suss out any infertility problem in your self. September 1, 2019 16:49

  35. I like the helpful information you provide in your articles.
    I’ll bookmark your weblog and check again here frequently.
    I’m quite sure I’ll learn plenty of new stuff right here!
    Best of luck for the next!

  36. Oh my goodness! Awesome article dude! Thank you, However I am having issues with your
    RSS. I don’t know the reason why I can’t subscribe to it.
    Is there anybody else getting identical RSS problems?

    Anyone who knows the answer can you kindly respond? Thanks!!

  37. Asking questions are genuinely fastidious thing if
    you are not understanding something totally, but this piece of writing
    presents fastidious understanding yet.

Leave a Reply

Your email address will not be published.