Create a Shortcode Plugin that uses ob_start() function to return data

  Рет қаралды 2,564

Joshua Herbison

Joshua Herbison

Күн бұрын

Пікірлер: 22
@jherbison
@jherbison 2 жыл бұрын
A very powerful function that stores data in a buffer.
@ЗаблокироватьГлобальныйПидарас
@ЗаблокироватьГлобальныйПидарас 2 жыл бұрын
Thank,s for interesting video lessons! I'm you're subscriber now!:)
@jherbison
@jherbison 2 жыл бұрын
Awesome. Welcome. I have a lot of videos coming.
@Nikoko-yr2mc
@Nikoko-yr2mc 2 жыл бұрын
Thanks for the tutorial. Can you teach how to create dynamic fields in metaboxes? Like a repeater field where we can add or remove fields?
@jherbison
@jherbison 2 жыл бұрын
I think I have done some metabox fields. The issue with Metaboxes is that gutenberg gets rid of using the metaboxes. You can do a custom post type that doesn't use gutenberg and you can turn off gutenberg for all post types, but a repeating field in metabox isn't a bad idea. I will add it to the list.
@Nikoko-yr2mc
@Nikoko-yr2mc 2 жыл бұрын
@@jherbison Thanks for the heads up. I don't want to use plugins so I wanted to learn to create a repeating fields.
@paulcodes
@paulcodes 2 жыл бұрын
Thanks for sharing this nugget! Just thinking outloud here, on the html.php page you create, can you reference a separate style sheet and potentially js file (i.e. link rel stylesheet...)? Or would you not want to do that since it is technically in the body of the document? or stick with inline CSS and script tags for JS?
@jherbison
@jherbison 2 жыл бұрын
You can do whatever you want really. You don’t even have to call in the get_header() and get_footer() if you don’t want to. You could call wp_header() and wp_footer() just to get all the other css and js without the themes header and footer. So yes, you can call in other css and js. I should expand on that video.
@paulcodes
@paulcodes 2 жыл бұрын
I see. Thank you @@jherbison
@jherbison
@jherbison 2 жыл бұрын
@@paulcodes You're welcome..
@jherbison
@jherbison 2 жыл бұрын
Just uploaded a second part to the video that addresses your question. Template In A Plugin Part 2 | WordPress Template in a Plugin | Create A WordPress Landing Page kzbin.info/www/bejne/e6jaXoqAqJuBjq8
@paulcodes
@paulcodes 2 жыл бұрын
@@jherbison I'll check it out now. Thank you!
@louisgautier690
@louisgautier690 8 ай бұрын
Hi, I try your method but the message "Json" is already here : plugin : function shortcode() { ob_start(); include('message.php'); $data = ob_get_contents(); ob_end_clean(); return $data; } add_shortcode('testsc', 'shortcode'); ?> message.php : can you help me ?
@jherbison
@jherbison 8 ай бұрын
Can you email me the info : josh@ideapro.com
@ibrahimkahlil2469
@ibrahimkahlil2469 Жыл бұрын
what about it? please explain. function shortcode_func(){ ob_start(); echo 'Hello world'; return ob_get_clean(); } add_shortcode('shortcode_name', 'shortcode_func');
@KenLyle
@KenLyle Жыл бұрын
That works for a trivial example. I think the video is to show a more general solution where you could do something interesting like a database query.
@aogunnaike
@aogunnaike 2 жыл бұрын
Awesome 👍😎 thanks for the good job
@jherbison
@jherbison 2 жыл бұрын
Thank you for watching and commenting.
@tiendungdev
@tiendungdev 2 жыл бұрын
Thank you!
@jherbison
@jherbison 2 жыл бұрын
You’re welcome. Thank you for watching and commenting.
@Daud181
@Daud181 2 жыл бұрын
Great
@jherbison
@jherbison 2 жыл бұрын
Thank you... Thank you for watching and commenting.
What is the difference between JSON and PHP Serialize
18:50
Joshua Herbison
Рет қаралды 1,5 М.
Using GET or POST, When, Why and How to get the data in PHP
14:32
Joshua Herbison
Рет қаралды 765
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 2 МЛН
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 11 МЛН
The Diode in Small Signals (4/6)
14:08
rolinychupetin
Рет қаралды 29
WordPress Tutorial on how to create a GDPR WordPress Plugin
1:37:05
Joshua Herbison
Рет қаралды 3,6 М.
What is ob_start() function in PHP - In 5 Minutes
4:50
Daily Tuition
Рет қаралды 13 М.
How to create a WordPress Gutenberg Custom Block
42:09
Joshua Herbison
Рет қаралды 50 М.
My Simple Neovim Setup For MAXIMUM Productivity
18:39
Seth Phaino
Рет қаралды 2,1 М.
Creating a plugin with  @wordpress/create-blocks that has multiple blocks
54:16
Ruby on Rails高级开发丨Model Migrations & Callback
59:23
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 2 МЛН