Site logo

Archived topic

Include .php in a block inside sidebar

5 replies · Started by mistergubu on January 10, 2022

Viewing posts 1–6 of 6

Hello,

I want to include a .php file with content (Ads) "in the middle" of the left sidebar, inside a block. How can I do it? I can't find any block container where I can add php code.

My left sidebar sould have this scheme:
-Search Box
-Ads (.php include)
-Categories box

Thanks

Hi there,

you can't add PHP inside a block. You would need to have a shortcode to run your PHP function or create your own custom block.

ok thanks, I understand now, I did it with a shorcode that run a function,
but can you give a basic example about how to create my custom block to run php code?

ok thanks,
everything resolved.

Thank you for letting us know. Glad you got it sorted. :D

This archived topic is closed to new replies.