I need to add some powershell code snippets to my blog article. I tried using the block code element but it just displays the code as text. What are the steps required to add code to a blog article and display it as a code snippet? I would prefer to do this myself. I just want to know the steps and what the code block options in the theme are.
Hey Brandon,
What code are you trying to add and what is the purpose of it?
Best regards,
Rikard
The purpose of the code snippets is that I’m explaining in a blog article how to do something. An example of what I’m trying to do is here: https://devcentral.f5.com/articles/powershell-abcs-p-is-for-parameters . Its a blog article. I just want to add code snippets and explain them. How do I do this in the enfold theme?
Hi,
You can wrap your codes into
<pre>
<code>
Your code here
</code>
</pre>
Best regards,
Yigit
As part of the theme, Enfold provides the Avia Layout Builder and the Content Element called a “Code Block”. Shouldn’t I be using this? Is there any reference information on how to use it?
There are 5 options as part of the code block element. code content, code wrapper element and these check boxes for enabling options. Can you provide some guidance here on using the theme features?
I tried your suggestion and it works a bit. The code does not have the lines numbered and the formatting looks wrong.
Thanks.
Hi,
Would you mind providing a precise link to your site, showing the elements in question? We need to be able to inspect them in order to help :)
Also admin access would be very helpful. Login details here as private content.
Best regards,
Andy