How are these registered in the WordPress Dashboard menu?

I have a website that someone else initially built. They added their own Advanced Custom Fields, and WordPress sidebar menu options for these custom elements, so these aren’t plugins you can remove.

My question for you folks is - Where the HECK are these being registered, and how do I remove them now that we’re not using them anymore (Work, Team Members, Services)?

I’ve looked in my config and includes, but I’m not sure where these would be generating from so I can remove them from the side menu.

Thank you!

how-do-these-get-here

Check your functions.php file.

Thanks for the response. I did check my functions PHP, but aside the auto-generated child theme functions, the rest is my custom code. Anywhere else I should be looking?

I would just be guessing without having the code to look at. Could you please post the structure of your wp-content directory?

Absolutely! Thanks :slight_smile:

If you use dev tools to inspect the push pin icon maybe the source will point you in the right direction? (i.e. a plugin folder)

Flamingo (https://wordpress.org/plugins/flamingo/) is a plugin. It works with your contact form to store messages in the WordPress database. You can unload it but first make sure your Contact 7 plugin is set to send email somewhere else as it’s currently sending the messages to the db. That’s why you find in the “inbound messages” a list of people who’ve submitted the form.

1 Like

Hi Js, I do know what Flamingo is, apologies if I wasn’t unclear, I didn’t mean to highlight it for the close up. What I’m curious about are the items WORK | TEAM MEMBERS | SERVICES. Thanks!

Those appear to be custom post types that’s what the pin means. You need to go through them and make sure that there aren’t any posts in there. If there are make sure you save a copy of the post somewhere so when you remove it you won’t lose it.

Once you’ve done that you can go to your theme folder and find the functions.php file. Copy it to your computer and make a backup copy. Open the file in a text editor (notepad, visual studio code, etc.) Look for some functions similar to:

// Our custom post type function
function create_posttype() {
 
    register_post_type( 'services',
    // CPT Options
        array(
            'labels' => array(
                'name' => __( 'Services' ),
                'singular_name' => __( 'Services' )
            ),
            'public' => true,
            'has_archive' => true,
            'rewrite' => array('slug' => 'services'),
        )
    );
}
// Hooking up our function to theme setup
add_action( 'init', 'create_posttype' );

Make sure… that you have a backup copy before editing the file!!

Then delete that piece of code.

You can find a tutorial on custom post types at https://www.smashingmagazine.com/2012/11/complete-guide-custom-post-types/ it’s a little dated but I don’t think it’s changed that much. If you get stuck just post here an I’ll try and reply.

1 Like

Thank you for the reply. I have scoured the theme functions.php for any reference to WORK, TEAM, or SERVICES, but there’s nothing there.

Here’s the parent theme and child theme functions.php in their entirety:

https://stabledev.wpengine.com/demo-for-sitepoint/

Very good idea, but unfortunately all references point to wp-admin >load-styles.php from the parent theme, and there are no references of either 3 nav items :confused:

If you can’t find the text in files, my guess is it’s in the database.

I don’t know what might be the better

  • creating a dump, and then opening it in a text editor to “find” the words
  • looking at the tables to locate possible fields, and running custom “WHERE - LIKE” queries

If it were me I’d try the dump first.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.