Forums

Post ID?! (2 posts)

  1. zeurois
    Member
    Posted 2 years ago #

    I'm trying to write a plugin to pick some settings and eventually display a different theme for a specific post.

    For instance:
    Default theme is A. For post x and post y I want to display theme B.
    I tried to pick up the settings from the database, but, for some reason, the $wp object is empty, get_the_ID() returns nothing, etc.

    Any idea?

    Also, I tried to create a new instance of WP within a function and I managed to find the current post ID, but that's returning a 404 error for the pages (all the pages). If I deactivate the plugin or cut that function out the pages work.

    Any help would be appreciated.

    Thanks

  2. zeurois
    Member
    Posted 2 years ago #

    Can someone help me?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags