Chrome Dev Tools console says every page in my blog has link to http://maps.google.com [closed]

Its definitely being hooked into wp_head(), probably with wp_enqueue_scripts(). To find the culprit: First, deactivate your theme, use a twentyx theme instead. Then refresh the front end and check the source code again. If it’s gone: its your theme. To find where its being called from in your theme, search your theme directory /socrates4/ for … Read more

WordPress Fatal Errors [closed]

The error messages are pretty straightforward. First error: custom_permalinks_original_post_link() is not defined. It might be one defined by a plugin called “Custom Permalinks”. See https://github.com/GSA/custom-permalinks/blob/master/custom-permalinks.php. If you need that functionality, install/activate the plugin or refactor your code. Second error: It’s clear that the category-icons plugin is doing something wrong and not calling wpdb::prepare() properly. You … Read more

Sub Plugin deactivation when Parent Plugin deactivate

You can use detect_plugin_deactivation, function detect_plugin_deactivation( $plugin, $network_activation ) { if ($plugin==”parentplugin/parentplugin.php”) { deactivate_plugins(plugin_basename(__FILE__)); } } add_action( ‘deactivated_plugin’, ‘detect_plugin_deactivation’, 10, 2 ); Add this snippet in your plugin’s main file.

unable to remove malware from wp website [closed]

Over the years, I have developed a process/procedure to recover a hacked site. While backups are good, it’s not always clear that a backup is ‘clean’ and not hacked. My process includes reinstalling all code (WP, plugins, themes) manually (themes/plugins via FTP from known good source, WP via the ‘update again’ on the Update page), … Read more

custom permalink for post only not custom post types

ok so after searching again i found this and it worked /** * Add new rewrite rule */ function create_new_url_querystring() { add_rewrite_rule( ‘recipes/([^/]*)$’, ‘index.php?name=$matches[1]’, ‘top’ ); add_rewrite_tag(‘%recipes%’,'([^/]*)’); } add_action(‘init’, ‘create_new_url_querystring’, 999 ); /** * Modify post link * This will print /recipes/post-name instead of /post-name */ function append_query_string( $url, $post, $leavename ) { if ( … Read more