• Is there a basic ‘how to’ guide for PHP code snippets? The FAQ only deals with the old version.

    I found a YouTube video but it only deals with he Visual screen, which for some reason is no longer working on my site (another topic entirely). Does this plug-in work with the Text screen?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello
    Thanks for the feedback. We will try to make the plugin page more friendly.

    In general, work with the plugin is as follows.
    1. Create a snippet. To do this, click on the menu PHP snippets – Add snippet. Enter the PHP code, without opening and closing tags. Example: echo "hello world";. Optionally fill the name and description for the snippet (this is to always remember what the code does). Save it.
    2. Then go back to the list of snippets (click PHP snippets – Snippets). The shortcode for the snippet will be displayed to the right of the name. Copy it.
    3. Paste the shortcode on the page where it should run. Any ways are correct: type in the visual/text editor or add gutenberg block “shortcode”.

    Best regards

    Thanks. I have now got it to do what I wanted it to do. I could not get the system to include() existing PHP files (which were just HTML text actually) but by replacing all those PHP files with snippets, the text in echo(), it did work. I might try something more complicated later…

    I am conscious of being hampered because the Visual editor is not working at the moment (a common problem wit WordPress it seems), and when I have fixed that I might be able to do more with PHP snippets.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Basic ‘how to’ guide’ is closed to new replies.