Could not find site error

Try this procedure: 1) Go in to Network Admin -> Sites and edit the site you want to BE the new ‘main’ domain so it’s url is http://example.com (remove the subdomain or subfolder path totally). There’s a checkbox to change site and home URL. Make sure that’s checked before you hit save. 2) Change the … Read more

Search and replace titles of posts with specific tags

//Search by tags $query = new WP_Query( ‘tag=old’ ); // Then update post titles if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); //check if title have “a new” if(strpos(get_the_title(),’a new’) !== false) : $post = array( ‘ID’=> get_the_id(), ‘post_title’=> str_replace(‘a new’,’an old’,get_the_title()) ); // Update the post into the database wp_update_post( $post … Read more

How to add image for custom taxonomy

You can use get_object_taxonomies() as your solution. Returns all the taxonomies for a post type or post object: <?php get_object_taxonomies( $object, $output ); ?> Have you tried anything? something like this? // taxonomy term archives $post_type = get_post_type(); // find out if CPT $taxonomies = get_object_taxonomies($post_type); // Find taxonomies if($taxonomies){ foreach($taxonomies as $taxonomy){ // only … Read more

How do I add functionality to images?

If you want to append HTML to images, you want to look inside the template files. Search for something like the_post_thumbnail function, and add your HTML right after the closing </a> tag (if there is one). You’d then need to style it with CSS so that it’s only visible upon hovering the image. For example, … Read more

Child Plugin Admin Panel

I’m assuming you’re asking how to remove the first action, which the plugin has created? Removing an action is really easy – all you need to do is call remove_action like this: remove_action(“admin_init”, “backend_plugin_css_scripts_mail_bank”); Then add your replacement action. You need to ensure that you remove the action after it has been added (because otherwise … Read more

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