• Just started working with this plugin, so perhaps I’m missing something. I browsed through the FAQs and didn’t find what I’m looking for.

    Despite the fact that I’ve disabled them in constructing my Custom Post Type, I note that the title and editor fields still appear in the Write Post screen. Any idea why this would happen?

    https://www.ads-software.com/plugins/magic-fields-2/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Yep. WordPress doesn’t allows you to ditch the title. This info is needed to construct the slug, view your posts in list, as well as retrieving the post by name or title; you have to keep it and I’d suggest you find a good use for it.
    However, the editor can be disabled.

    Thread Starter Tom Belknap

    (@dragonflyeye)

    Yes, you can disable both, and I’ve done it when creating CPTs programmatically. This just seems to be a small big on the plugin.

    Oh… Ok.
    I tried it but how do you spot your CPs in the admin panel (without title, that is)?

    Thread Starter Tom Belknap

    (@dragonflyeye)

    They show up as their IDs. Or in my case, I used the filter on the_title to replace the title with something appropriate (in this case, the first and last names of the person the record was for).

    In any event, the plugin gives you the option to disable both fields and doesn’t actually do it. But if you put text into the editor with the editor disabled, the content doesn’t save, so clearly something’s happening.

    I used the filter on the_title to replace the title with something appropriate

    How do you do that?

    Thread Starter Tom Belknap

    (@dragonflyeye)

    You’d have to look here for how the_title() works:
    https://codex.www.ads-software.com/Plugin_API/Filter_Reference/the_title

    But basically, take the title that’s given (which is blank) and replace it with content from the custom field. In the case of Magic Fields, you’d use get_group(‘name’), presumably you had the first and last names inside a field group. Then return the title as a string. Done.

    Ah. Sorry, I thought you found a way to list your posts with a custom field in the admin panel.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP 3.6.1, editor and title not disabled’ is closed to new replies.