doc:tips:randomentry
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| doc:tips:randomentry [2022/11/27 13:52] – added initial content arvid | doc:tips:randomentry [2022/11/27 14:21] (current) – old revision restored (2020/04/15 20:50) arvid | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== How to disable character replacement | + | ====== How to link to a random entry ====== |
| - | ===== Default behaviour ===== | + | You may wish to serve your blog visitors a link to a random entry in your blog. To achieve this, just append ''? |
| - | By default, FlatPress replaces some characters (or character combinations) within | + | |
| - | * Two hyphens ("< | + | |
| - | * Three dots ("< | + | |
| - | * Quotations marks become typographic: | + | |
| - | * Trademark sign: "Text < | + | |
| - | * Multiplication sign: "< | + | |
| - | ... and a few more. | + | |
| - | ===== How to disable | + | ===== Example |
| - | If you would like FlatPress __not__ to do these character replacements, | + | Link to a random entry on flatpress.org: https://www.flatpress.org/?random\\ |
| - | + | (Try and reload! You will be served another random entry each time.) | |
| - | After the first two lines of your index.php, just add the '' | + | |
| - | + | ||
| - | < | + | |
| - | include ' | + | |
| - | include INCLUDES_DIR . ' | + | |
| - | + | ||
| - | // ADD THIS LINE: | + | |
| - | remove_filter(' | + | |
| - | + | ||
| - | define(' | + | |
| - | + | ||
| - | ...</code> | + | |
| - | + | ||
| - | + | ||
| - | ===== More details ===== | + | |
| - | The described replacements take place in the function '' | + | |
doc/tips/randomentry.1669553573.txt.gz · Last modified: by arvid
