Remove Logo GeoDirectory

User
remove profile logo from geodirectory place listings
Assistant
To remove the profile logo (or any image) from GeoDirectory place listings in WordPress, you can either use custom CSS or a template override. Here’s how to do it:

### **1. Using Custom CSS**
If you want to hide the logo without altering the template files, you can use CSS. Add the following code to your theme's **Additional CSS** section (under Appearance > Customize):

.geodir-listing .geodir-logo {
    display: none !important;
}

### **2. Modifying the Template**
If you'd like to remove the logo directly from the HTML output:

1. **Locate the Template File:**
– Check GeoDirectory documentation or settings to identify the template responsible for rendering place listings.
– It is usually in `wp-content/plugins/geodirectory/templates` or overridden in your theme's `geodirectory` folder.

2. **Create a Template Override:**
– If not already overridden, copy the relevant template file (e.g., `listing-item.php`) from the plugin directory to your theme’s `geodirectory` folder.
– Path in your theme: `wp-content/themes/your-theme/geodirectory/`.

3. **Edit the Template:**
– Open the copied template file in a code editor.
– Look for the section of code responsible for displaying the logo. It might look something like this:

<?php if ( isset( $post->image ) ) : ?>
         <img src="<?php echo esc_url( $post->image ); ?>" alt="<?php echo esc_attr( $post->post_title ); ?>" class="geodir-logo">
     <?php endif; ?>

– Remove or comment out this section.

4. **Save and Test:**
– Save the file and refresh your site to verify that the logo is no longer displayed.

### **3. Using Hooks (Optional)**
GeoDirectory often uses hooks for adding elements like logos. If the logo is added via a hook, you can remove it with the following in your theme’s `functions.php`:

add_action( 'init', function() {
    remove_action( 'geodir_some_logo_hook', 'geodir_logo_function' );
} );

Replace `geodir_some_logo_hook` and `geodir_logo_function` with the actual hook and function names used by GeoDirectory for the logo.

Let me know which method you’d like to proceed with, and I can assist further!

Leave a Comment

Your email address will not be published. Required fields are marked *