How to Call PHTML File from Custom Theme to CMS Block in Magento 2

blocksmagento2phtml

I have created a custom block using Magento 2 UI, I know that I can't have any PHP in the block so I have created a test.phtml file and added it to my custom theme on the server.

Now, I want to call that block but can't figure out what path it will be.

The location of the test.phtml is following:

app/design/frontend/CustomTheme/CustomChild/Custom_Themesettings/templates/html/test.phtml

How should I call this test.phtml file in my block? I got something like this but it's not working:

{{block type="core/template" template="app/design/frontend/CustomTheme/CustomChild/Custom_Themesettings/templates/html/test.phtml"}}

Best Answer

File location will be

app/design/frontend/CustomTheme/CustomChild/Magento_Theme/templates/html/test.phtml

calling a block

{{block class="Magento\Framework\View\Element\Template" name="testblock" template="html/test.phtml"}}