WordPress.org

Ready to get started?Download WordPress

Forums

page ID / permalinks (2 posts)

  1. Trezzle
    Member
    Posted 3 years ago #

    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
    friendliness?
    I've already tried this like permalink: /% post-name /? page_id =%
    post_id% But unfortunately he takes only posts and not pages.

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    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; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic