• working on a mod rewrite for url
    https://nameofsite.com/?p=10
    to read the title of the post in the url, example:
    https://imcsites.com/name-of-post-title/name-of-post-title

    I have done the following to establish this:
    Login into wordpress and then options and then permalink

    custom field place this:/%category%/%postname%/

    in .htacess file place this:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    go to header.php and paste the following in the title:

    <title>

    <?php wp_title(‘ ‘); ?><?php if(wp_title(‘ ‘, false)) { echo ‘–’; } ?><?php

    bloginfo(‘name’); ?>

    </title>

    My finished result does include the title in the url but the content like my side bar and headers disappear.

    is there more that i need to include?

Viewing 1 replies (of 1 total)
  • Thread Starter luemob

    (@luemob)

    I wanted to clearify that my images disappear, the side menu and the header images but the title does appear in url..

Viewing 1 replies (of 1 total)
  • The topic ‘mod rewrite permalinks htaccess header.php’ is closed to new replies.