Which things should be called with `after_setup_theme`?

after_setup_theme is a wordpress hook which fires after the theme is loaded after_setup_theme runs before init and is generally used to initialize theme settings/options before a user is authenticated. According to the Codex: This is the first action hook available to themes, triggered immediately after the active theme’s functions.

Make multiple URLs behave as home page

Just intercept the hook to determine which template to use. To make all pages act as the homepage: add_filter( ‘template_include’, function($template) { return get_template_directory() . ‘/index.php’; });

Easy Digital Downloads – How to use hooks correctly?

You don’t put do_action() anywhere. The plugin runs that when that action occurs. You just need to hook into it with add_action(). The way hooks work is documented here. If you’re not sure when or how a plugin’s own hooks, such as this one, are fired, then you’ll need to contact the plugin developer, or … Read more

Display custom user profile fields in wordpress

i’m using this answer as a playground for helping you out here. better, than in the comment section. for anybody else stumbling about the same question: i recommended ACF as a plugin for custom fields, as it is well maintained and can add custom fields to anything inside wordpress (posts, pages, attachments, taxonomies…) to get … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)