WordPress.org

Ready to get started?Download WordPress

Forums

How to bypass empty title/content check on publish? (3 posts)

  1. Waqas
    Member
    Posted 1 year ago #

    I'm making a wp site blog + portfolio

    in my portfolio I don't want to create posts with titles and content, but wordpress wont post empty posts. Im using custom fields.

    I search a tittle bit on google. some people suggest using css to hide title tag. but that is just a basic thing. the url still remains with title.

    also I came across a method of tricking wp by inserting a title automatically and removing later.

    the code can work for web solely design for single purpose. my problem is Im having a good developed blog and portfolio, so I can trick with functions coz they will work globally.

    this piece of code which checks the post for empty title and content can be seen here

    I can remove it for instance but its not convenience. is there any method to eliminate this check from functions.php?

  2. bcworkz
    Member
    Posted 1 year ago #

    Looks like this should work:

    function skip_check() { return false; }
    add_filter('wp_insert_post_empty_content', 'skip_check');
  3. Waqas
    Member
    Posted 1 year ago #

    I tried by removing that snippet from wordpress core file.

    it worked but after publishing I wasn't able to delete posts

    I think I'd go with titles as wordpress don't support it officially. thats why I say its not cms. :D

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.