Support » How-To and Troubleshooting » page ID / permalinks

page ID / permalinks

  • I have a problem within WordPress.
    I have created 80 pages in WordPress, which were initially called
    mysite.com/? Page_id = 123 Now I had the php header put down ….
    <h2> /” style =
    “background: transparent url
    http://www.mijnsite.nl/wp-content/themes/images/logo <? 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 ..
    mysite.com/pagina1 / (/% 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)
  • 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.
Skip to toolbar