Support » Fixing WordPress » page ID / permalinks

  • I have a problem within WordPress.
    I have created 80 pages in WordPress, which were initially called Page_id = 123 Now I had the php header put down ….
    <h2> /” style =
    “background: transparent url
    ( <? echo $ _GET
    [‘page_id’];?>. jpg) no-repeat left top ;”><? php blog info
    (‘name’);?> </ a> </ h2> If I get a different image for each page_id
    created before, then I got another very nice header.
    Now we want the wordpress URLs of the pages to be search engine
    friendly by the permalinks to put as the next .. / (/% post-name% /) But because there is no $ _GET
    [‘page_id’] anymore, there is no header loaded.
    How can I combine both page_id able to load and keep the search engine
    I’ve already tried this like permalink: /% post-name /? page_id =%
    post_id% But unfortunately he takes only posts and not pages.

Viewing 1 replies (of 1 total)
  • Michael


    Forum Moderator

    instead of:

    <? echo $ _GET['page_id'];?>

    try to use:

    <? echo $post->ID; ?>

    if this interferes in single posts or archives, try:
    <? if(is_page()) echo $post->ID; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘page ID / permalinks’ is closed to new replies.