Tutorial

WordPress Hacks

This is a compilation of things I need in WordPress and wrote down for personal use. Mainly aimed for non-pricing WordPress subscription, since I don’t pay for my website (yet).

Anchors

Anchors are link related, which when the URL with them attached is called, the page in the browser moves to a specific segment/header or position on the post and be sure it is in arrows (start with < and ends with >).

span id="your_segment_id" class="anchor"

Some examples on this blog post:

Anchors
Code Blocks
Paragraphs

Code Blocks

Code blocks is preformatted text which is highlighted based on the language of the code. Add this to the beginning of the preformatted text and be sure it is in brackets (start with [ and ends with ]).

code language="your_code_language"

Example:

public class TestClass
{
public string SomeStringProperty = "Potatoes suck.";
}

As a quick note, I noticed that when pasting code while editing a post in visual mode, the formatting gets fucked, so I highly recommend you to switch to HTML mode and paste it so.

The following are the available languages you can put in:

  • actionscript3
  • bash
  • clojure
  • coldfusion
  • cpp
  • csharp
  • css
  • delphi
  • erlang
  • fsharp
  • diff
  • groovy
  • html
  • javascript
  • java
  • javafx
  • matlab (keywords only)
  • objc
  • perl
  • php
  • text
  • powershell
  • python
  • r
  • ruby
  • scala
  • sql
  • vb
  • xml

Paragraphs

You get locked writing constantly preformatted, even if you’re trying to go to the next line? Press Shift + Enter.

Apparently, just realized you can use the same keys for simple text like this,
to jump to a
new line,
but not paragraph so,
cool!