WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type Archives
[resolved] is_post_type_archive Failing Sporadically (2 posts)

  1. 10sexyapples
    Member
    Posted 3 years ago #

    Hi There. I switched to using your code on the current site I'm building ... thank you for your work ... but wanted to let you know that the conditional for is_post_type_archive is failing on me sporadically.
    I added in a function to flush the rewrite rules on activate and deactivate of the plugin, and have to do this in order to gain functionality of the conditional again ... otherwise it just continues to fail and my sidebars that are meant to show up in the archive don't get pulled in.
    I have no idea what is causing this, but, thought you might be interested in taking a look to troubleshoot? If so, just let me know and I'll give you a login to the site to take a look.
    Figured I would try here before going ahead and just hard coding a different sidebar for those ;-)

  2. 10sexyapples
    Member
    Posted 3 years ago #

    Marking this resolved as it is no longer relevant ... code exists in core now to achieve the necessary result.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic