WordPress Code Troubleshooting

Subtext: Learning to use WordPress to communicate, explore, and demonstrate code. A hello world post.

Having used highlightjs on codepen projects in the past, I discovered an easy plugin to give ‘smart’ syntax highlighting on wordpress (powered by highlightjs).

Example using AngularJS to wrap highlightjs in a directive:

See the Pen Colored Syntax: Directive Wrapping Highlight.js by Zachary Beyer (@Zbeyer) on CodePen.

The WordPress plugin–unfortunately–appears to take issue with being printed on the home page, or I have a problem with my chosen theme.

- (void) runThisFirst {

NSString * myFirstPost = [NSString stringWithFormat:@"Hello World. Hello WordPress. Hello Zbeyer.com/"];
NSLog(@"%@",myFirstPost);

}

Perhaps it’s just the use of the [ code ] [/ code ] format.


NSLog(@"Can the home page see me now?");

Even worse there appears to be some conflicting styles–and no styles in the home page preview. So from this point out the decision must be made: all code snippets must be viewed on the actual post page and not the preview on the home page.

Well this has been a fantastic first post on the 2015 ZBeyer website. Ambiguity thy name is WIP.

Bookmark and Share

One thought on “WordPress Code Troubleshooting

Leave a Reply

Your email address will not be published. Required fields are marked *