How to set category correctly for a custom post created by a remote API call?

Functions like get_cat_ID and get_category_by_slug only work for core post categories (taxonomy category) – you are dealing with a custom taxonomy todocategories. I see you have $a2zq3_cat_name=”Category-name”; hardcoded near the top, so I assume you’re not assigning the todocategories from POST data. In which case just use wp_set_object_terms() like so. wp_set_object_terms( $a2z3_entry_post_id, [ ‘the-category-slug’ ], … Read more

Is there a plugin for automatically adding a word or symbol after a trigger word? I.e. Like a search and replace but more like search and add? [closed]

This would run a find-and-replace on displaying the title and content field: function wpse_406537_search_replace( $content ) { $company_name=”The Company”; $company_name_regex = preg_quote( $company_name, “https://wordpress.stackexchange.com/” ); // Best-guess attempt at replacing company name that doesn’t yet have ™️ // e.g. The Company[space] // e.g. The Company. // e.g. The Company, // e.g. The Company[end of string] … Read more

How to remove js ui library added by default by wordpress

The related library is registered with a function called wp_default_scripts. File location (for WordPress 6.0): …wp-includes/script-loader.php remove to remove the relevant script; The add function is used to add a new script. /** * Assigns default styles to $styles object. * * Nothing is returned, because the $styles parameter is passed by reference. * Meaning … Read more

When I try to de-activate any plugin it gives error “Warning: call_user_func_array() [function.call-user-func-array]”

The Youtuber plugin has a little error: it has a function to remove it’s own options, called wp_youtuber_uninstall. However, it hooks into the deactivate_plugin option with the function youtuber_uninstall, which does not exist. This has been reported in the WP support forums. You can remove the line that says add_action(‘deactivate_plugin’, ‘youtuber_uninstall’ ); to get rid … Read more

Which plugin can do horizontal scrolling of RSS feeds in WordPress [closed]

Things that present headlines in a horizontal scroll tend to be called tickers. (Probably due to there resemblance to old-school ticker tape printers.) Anyway, try these: http://wordpress.org/extend/plugins/news-ticker/ http://wordpress.org/extend/plugins/wordpress-news-ticker-plugin/ (may not do RSS) http://wordpress.org/extend/plugins/accessible-news-ticker/ They should all do pretty much the same thing, but they will differ in their appearance. If you don’t mind about the … Read more