• lynx

    (@lynx)


    Hi!

    I just want to program a little statistik-plugin, because none of the existing make me happy…

    I will read out the REQUEST_URI on each pageview and put the data for this view into a stats-table…

    Unfortunatly I need to get the information, if the page viewed is a page, a post or a category. And I need the ID of the page, post or category… there exists a function called “url_to_postid”, but this only works for posts… not for pages or categories…

    Has anyone a way to get the IDs outside the loop?

    Best regards!

    jens

  • The topic ‘How to get the post-ID to a Request-URI’ is closed to new replies.