So you want to add your custom taxonomy to a menu. You probably have to alter your screen options to let the taxonomy appear in your ‘menus’ menu. However, these settings are user -specific. So if your client also should be able to change this menu, switch to your client’s profile and change the screen options accordingly. Or tell your client how it works…
Category: Wordpress
WordPress Multilingual (WPML) – tips
Just some short notes on using WPML in wordpress:
Translating theme strings
In the code use this for strings that should be translated (example is for ‘roots’ theme)
echo __('Instructors', 'roots') |
Then in the WPML settings, got to the tab ‘Theme and plugins localization’
Scroll down and click ‘Scan the theme for Strings’
Then scroll slighlty up and click the button ‘View strings that need translation’
Add your translation(s) and save
WP plugin Exploit-scanner – updating the hash file
Just a reminder. After a wordpress update you should also upload a new hash.php to the exploit-scanner directory on your server
They can be found for example here:
WordPress with Isotopes
I finally managed to get my WordPress theme (based on roots101) working with isotopes
I mainly followed this post: http://jasonskinner.me/2013/04/creating-a-filterable-wordpress-photo-gallery/
But there were some problems on the way:
– First of all, I stripped out the whole fancybox thing (references, lib and all)
– then I customized the php to find the terms for my custom taxonomy
– Important: I changed the code to use the term slug instead of the name! The term with whitespace was causing lots of troubles.
– I also added a function that jshint didn’t recognize to .jshintrc
I think those were the main steps apart form configuration and styling of course
Custom Post Types
Apart form the many examples on the internet and elsewhere (for example in WordPress for Web Developers) here are some notes:
– When custom posts don’t show up after creating them, it may help to set the permalinks to default and back again to your preffered setting.
– To change where the custom post type appears in the admin sidebar, set menu-position to one of the following:
The WordPress Template Hierarchy
http://codex.wordpress.org/Template_Hierarchy
The General Idea
WordPress uses the Query String — information contained within each link on your web site — to decide which template or set of templates will be used to display the page.
To see the query string put this in your theme’s page template:
<?php
echo "<pre>"; print_r($wp_query->query_vars); echo "</pre>";
?>
WordPress matches every Query String to query types — i.e. it decides what type of page (a search page, a category page, the home page etc.) is being requested.
Templates are then chosen — and web page content is generated — in the order suggested by the WordPress Template hierarchy, depending upon what templates are available in a particular WordPress Theme. Read More
WordPress with GIT, WP-Skeleton and Roots 101
Goals: – Keep a local WordPress installation under version control (but ignore WordPress core files) – Use WP-Skeleton (wordpress core as submodule in separated folder, content and config files in root) – Use the starter theme Roots 101 – Deploy to a staging and production server (depending on the current Git branch?) – Keep uploads out of version control, sync them separately – Use a good DB migration strategy – If possible: automate repetitive tasks Read More
Sublime Text 2 Plugins
For WordPress:
Some Sublime plugins that work great (so I’ve heard) with WordPress development
WordPress, Git and WP-Skeleton – a tutorial
Following a series of videos from Amelia Briscoe to setup a workflow with wordpress and git
1. Importing a wordpress git repository
– Sign up to a bitbucket account
– Import Jaquith’s WordPress-Skeleton into Bitbucket
Read More
Installing WP-CLI on cygwin
To install WP-CLI on my Windows 7 machine with cygwin I did the following:
First, running the installer as provided by http://wp-cli.org/ doesn’t work, since the installer cannot find php.
So instead run:
curl https://raw.github.com/wp-cli/wp-cli.github.com/master/installer.sh >installer.sh