in Web and Tech

Random Notes: On WordPress

Disabling Plugin Update notifications – The script that disables update notifications only works when the plugin is active. Otherwise, plugin update notifications are still displayed


There is a WP constant that forces admin users to go to use SSL.

define('FORCE_SSL_ADMIN', true);
//in some setups HTTP_X_FORWARDED_PROTO might contain
//a comma-separated list e.g. http,https
//so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';


On Custom Post Types, Taxonomies and Custom Page Templates:

Taxonomies are categorizations of data. Tags are a taxonomy. Categories are another taxonomy. If you are building a movie website and want to show which actors starred in which movie, “Movies” would be a custom taxonomy.

Custom Post Types are really just custom data items. They’re stored just like posts and pages, but aren’t considered the same thing as a post or a page. In the movie website example above, “Actor” might be a custom post type with a Name, a Biography, and a Headshot as elements.

Custom Page Templates are special files for WordPress that dictate how the content will be laid out on the page. They’re used strictly with pages in WordPress, not with posts or custom post types.

Think of it this way:

Types of Data:

  • Posts
  • Pages
  • Menus (yes, these are a custom post type)
  • Custom Post Types

Ways to Structure and Relate Data:

  • Tags
  • Categories
  • Post Formats
  • Custom Taxonomies

Ways to Present Data:

  • Custom Page Template

More on taxonomies:
Inserting a term into a custom taxonomy
https://wordpress.stackexchange.com/questions/163541/inserting-a-term-into-a-custom-taxonomy

Write a Comment

Comment