How to get the post-ID to a Request-URI (1 post)

  1. lynx
    Posted 10 years ago #


    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!


Topic Closed

This topic has been closed to new replies.

About this Topic