functions.php conditional output for a single plugin
functions.php conditional output for a single plugin
functions.php conditional output for a single plugin
I decided on a different approach. Keep the default permalinks in admin, then add a rewrite to allow /course: add_rewrite_rule(‘^course/([^/]*)/?’, ‘index.php?event=$matches[1]’, ‘top’); // single event Then I can update my theme templates with the course/ urls where needed.
Where to put hooks will depend on each project. However, some basic places to think about: Shortcodes Querying posts Extending markup I would recommend the article Writing Extensible Plugins With Actions and Filters. It may help you to expand your ideas.
Making Site A Use Site B’s wp-content Folder
Remove “enqueued” script from array
Here is the short sweet answer. Somewhere you, a plugin, or your theme are doing something like this: wp_register_script( ‘myscript’, get_template_directory_uri() . ‘/path/to/myscript.js’, ”, ”, true ); What should be happening is this: add_action( ‘wp_enqueue_scripts’, function() { wp_register_script( ‘myscript’, get_template_directory_uri() . ‘/path/to/myscript.js’, ”, ”, true ); } ); From the Notice: Scripts and styles should … Read more
There is no need to add any code for this. You can use the Screen Options on the menu admin end to achieve this. Please check the instructions below. Login to the admin end of your wordpress site and navigate to Appearance => Menus section. Click the down arrow against the menu item you need … Read more
You would want to use the user_register and edit_user_profile_update actions. In this way you’ll take care of both scenarios. Be careful. Both of these fire after the user information has already made it to the database.
The documentation for the save_post action says: save_post is an action triggered whenever a post or page is created or updated, which could be from an import, post/page edit form, xmlrpc, or post by email. So, you should only need the save_post action to run the desired code when the post is changed.
include TEMPLATEPATH.”/inc/settings.php”; is your problem. TEMPLATEPATH is used by the parent theme For child themes use STYLESHEETPATH so your code will be include STYLESHEETPATH.”/inc/settings.php”; Alternatively you can use get_stylesheet_directory_uri().’/inc/settings.php’