Home Blog Archive Internet WordPress: show source code - how to

WordPress: show source code - how to

  • Nov 25, 2025
  • 508
  • 0

The source code is in a WordPress only in a roundabout way, to view. Here we explain to you how this works.

WordPress Blog: view source - how to

Wordpress provides the possibility to View the source code already.
  • Normally, you can have the source code, such as HTML snippets or not directly in a Blog Post, because the Code is read directly.
  • You can work around in Wordpress is by wrapping the Code with [code][/code].
  • You need to specify the Code language. For CSS, for example: [Code language="css"][/code].
  • The following languages can you so directly from Wordpress view: actionscript3, bash, clojure, coldfusion, cpp, csharp, css, delphi, erlang, for those who are curious, diff, groovy, html, javascript, java, javafx, matlab (Keywords), objc, perl, php, text, powershell, python, r, ruby, scala, sql, vb and xml.
  • Completely it looks like this: [Code language="css"]Here is your CSS could be Code[/code]
WordPress: view source

A valid source code to display in Wordpress

You can also change the Code-Tags also by a variety of parameters.
  • auto left="true" (true or false): Links in the source code can be clicked. If you do not set this Parameter, it is automatically enabled (true).
  • collapse="false" (true or false): The source code must be clicked so that it is visible. The default is "false".
  • firstline="1" (numerical values): allows you to define to which number the line numbering of the code block start. Normally it starts at 1.
  • gutter="true" (true or false): you can hide the line numbering completely (false). By default, it is enabled (true).
  • highlight="2,5,7" (numbers with comma): this single Code can be used to lift lines out.
  • htmlscript="false" (true or false): in order To highlight any kind of HTML/XML Code. This is useful when you mix different languages such as HTML and PHP. By default, the Option is disabled.
  • light="false" (true or false): allows you to activate the "light" version of Codeblocks. Thus, line numbering and other features are hidden. This is useful if you only want to display a little bit of Code. Normally, the function is not activated.
  • padlinenumbers="true" (true, false, or numerical values): in order To define the distance values of the Codeblocks. Normally, this will be regulated automatically (true), you can disable the spacing but also the (false) or any value entered.
  • title="block-title" (text input): allows you to define a name for the code block. This is especially helpful if you are using "collapse" to hide it. Simply enter any title you like.
Next, we will explain you how you WordPress Social Media Plugins to embed and as you quite specifically a "Like"Button to activate.

YOU MAY ALSO LIKE

0 COMMENTS

LEAVE A COMMENT

Human?
1 + 3 =