Skip to content
Luke C Hartman edited this page Sep 19, 2022 · 11 revisions

WordPress hooks and filters

They're the foundation of how to build things in WordPress. The very, very basic idea is:

  • Hooks are used when you want something to happen at a certain time. Like, when a post is saved, do this unrelated thing.
  • Filters are used when you want to change the data that gets used. Like, when a post is saved, change it to all caps or whatever...

Learn about WP_Query()

You'll use this A LOT. It's very powerful and you can access whatever posts you want by building the right query. You shouldn't ever really need to write your own SQL query to get what you need. WP_Query() can likely do what you want.

Images

When small images are resized to make them larger, it is very noticeable and the larger they become, the more blurred they are. It is a serious problem. Upload an image that is too small for your website and the result will be blurred images.

If you don’t know what size to use, upload a larger image than you might need rather than a smaller one because there is less blurring with shrinking images to fit than with stretching them.

More info here.

Editing

Simple interface for adding new publications to the publications page:

CME Publications Page Edit

  1. Add a new publication
  2. Drag to reorder
  3. Delete a publication.
  4. Add a publication in between.

ADDING A NEW POST TYPE OR TAXONOMY

  1. Add the post type and taxonomy as one file under /Managers/Structures/PostTypes
  2. Add the rewrites for the new post type following the format under /Managers/Permalinks
  3. Add the rewrites for the vertical under /Managers/Permalinks/addVerticalRewrites()
  4. Add the taxonomy slug to the $taxRewriteMap in /Models/Permalinks
  5. Register the Post Type to the Vertical Taxonomy under /Managers/Taxonomies/Taxonomies
  6. Update Permalinks
  7. Register a new filter menu for the item in Globals.php following the format for the other post types
  8. Edit /archive.php to specify what filter menu should apply for your new archive, however you need it set-up
  9. Go to Options -> Custom Fields -> Archive Landing Pages -> Landing Pages -> Landing Page Type and add the post type slug as an option for this field
  10. Test it out!

Plugins

Only make edits on the Engage theme & never use the Theme Editor.

Never use the WP Theme Editor

Wordpress core and plugin files should not be edited/changed due to ongoing updates, as your edits will be overwritten. If you would like to make changes related to plugins do those from within the plugin’s admin settings inside the WordPress admin dashboard on your local install.

ENP Registration Plugin

WordPress registration email edit

See the enp-custom-registration repo/plugin.

SEO / Rank Math

Understanding Rank Math

Important links:

SEO on Research pages

  1. Add the focus keyword

add the focus keyword here

  1. Add meta description (with the focus keyword in copy) meta-description-01 meta-description-02

  2. Add the focus keyword as alt text to Featured Image.

feat-image-01 feat-image-02

Use the Analytics & SEO Analysis pages to dig into: