Formatting Codes

The site runs a system of ‘shortcodes’, a very quick and simple way of easily enhancing your content, through surrounding it with a specific formatting code.

This is achieved through prefixing the text with [the_code] and ending it with [/the_code]. The codes are replaced with the desired formatting at the time of publishing.

You can use these to style your text in various ways such as adding an Info Box, or most pertinently sharing code samples. Codes for showing lines of software are simply the coding language that you are using. So if you want to show PHP code for example, you would surround your code lines with [PHP] and [/PHP], producing an output like this:

<?php
private function get_time_tags() {
$time = get_the_time('d M, Y');
return $time;
}
?>

 
Supported languages – You can repeat this approach for any of these:

as3, actionscript3, arduino, bash, shell, coldfusion, cf, clojure, clj, cpp, c, c-sharp, csharp, css, delphi, pas, pascal, diff, patch, erl, erlang, fsharp, go, golang, groovy, haskell, java, jfx, javafx, js, jscript, javascript, latex, tex, matlab, matlabkey, objc, obj-c, perl, pl, php, plain, text, ps, powershell, py, python, r, splus, rails, rb, ror, ruby, scala, sql, vb, vbnet, xml, xhtml, xslt, html, yaml, yml.

Reference Footnotes

You can also annotate your article with reference footnotes using shortcodes.

This is achieved through using [ref] and [/ref], which you add immediately after the text you want to annotate.[1]Within those codes you write the text you want to appear in the footnote, like this..

..which you add immediately after the text you want to annotate.[ref]Within those codes you write the text you want to appear in the footnote, like this.[/ref]
In that text you can include references like URLs[2]https://codethefuture.scot/submit-article/codes/.

Display Codes

A variety of codes are available for nicely enhancing your content:

Info Box

[box type=”info”]This is an Info Box.[/box].

This is an Info Box.

This highlights that some shortcodes accept additional parameters, like the ‘type’ of Box.

type=”success”
type=”warning”
type=”error”
type=”download”
type=”note”

Author Bio

[author title=”Author Bio” image=”https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg”]This is the biography of the article author.[/author]

Author Bio

This is the biography of the article author.

References

References
1 Within those codes you write the text you want to appear in the footnote, like this.
2 https://codethefuture.scot/submit-article/codes/
Back to top button