• Hello!

    get_post_type() function plays important role in one of my plugins. In localhost it returns custom post type, just as expected. But on the server, it returns nothing.

    I changed ‘WP_DEBUG’ as ‘true’ in server’s wp-config.php file, but got no error messages.

    I’m really confused here.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Just asking the obvious here but is the CPT included on the server too?

    Thread Starter halleluuja

    (@halleluuja)

    SOLVED!

    All I needed to do was simply visit the Settings > Permalinks page on Admin area. That caused the rewrite rules to be flushed — and my plugin became to work like a charm.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_post_type function only works on localhost’ is closed to new replies.