0

i am new to magento & using magento 2 . I have to run a php code in my cms page . When i check the website i can understand that the theme is Alothemes Bencher6 . So what i did is

app/design/frontend/Alothemes/bencher6/Magento_Theme/templates

i create a new folder called myphp and file myphpcode.phtml insidethis folder .

So

app/design/frontend/Alothemes/bencher6/Magento_Theme/templates

there is two folder

  1. html (this folder is there previously)
  2. myphp (my custom folder )

in myphpcode.phtml i write the following code

<?php echo 'hiiiiiiiiiiii' ; ?>

Now i created a new page in magento and write the following code in content section

<block type="core/template" name="myphpcode" template="myphp/myphpcode.phtml" />

But for some reason this code is not working . I clear the cache . But still same . Please help

0

Add This :-

{{block class="Magento\Framework\View\Element\Template" template="Magento_Theme::myphp/myphpcode.phtml"}}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.