bentonda
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Permalinks hide page id from my codeI am going to have to have a close look at what is going on. The two variables are definitely picking up the correct information.
Its got me beat at the moment.
Thank You for your help
BenForum: Fixing WordPress
In reply to: Permalinks hide page id from my codeExactly the same numbers as I have in my case statement above;
‘
switch ($page_id) {
case 0: $page_subject = ‘BLOG’; break;case 45: $page_subject = ‘WEDDING’; break;
case 47: $page_subject = ‘PORTRAIT’; break;
case 51: $page_subject = ‘HOME’; break;
}
‘Forum: Fixing WordPress
In reply to: Permalinks hide page id from my codeI placed this code above the switch echo $page_id;
The page id flashed up on the screen in the top left hand corner.When I inspect the page source it is printed right in above the tag named
<!DOCTYPE html>Forum: Fixing WordPress
In reply to: Permalinks hide page id from my codeI tried that and it returns an Error occurred: 404 – not found message.
I think the page_id is being blocked by the permalink function it seems to be interfering with it being seen by the code in my header.php
Forum: Fixing WordPress
In reply to: Permalinks hide page id from my codeI’m not clear on how it works but it gets its value from the page_id, which is generated by wordpress.
Forum: Fixing WordPress
In reply to: Browser address display permalinks and not idThank You esmi the instruction in the document creating a static front page proved to be very helpful.
Cheers
BenForum: Fixing WordPress
In reply to: Browser address display permalinks and not idOkay I have had a quick go at that and I only created menus items for the pages, and now I have no way of navigating to the blog page, without creating a custom link.
So how would I navigate to the blog page?
Forum: Fixing WordPress
In reply to: Browser address display permalinks and not idThe whole menu named my_menu?
Forum: Fixing WordPress
In reply to: Browser address display permalinks and not idI have created a menu called my_menu and I have three menu items with the word page in the top right hand corner;
Home
Wedding
PortraitAnd then I have one menu item with the word custom in the top right hand corner;
Blog
Forum: Fixing WordPress
In reply to: Browser address display permalinks and not idYes you are right under menus i have a menu entry named blog and in the URL section I have the following;
http://www.bentonphotographic.com.au/berlin/?p=0
On the wp-admin/nav-menus.php screen under heading pages there is no page named blog. When I have done a search on the page named blog nothing comes up either.
So I did create a custom link item here and called it blog with the hard wired entry as described above.
Is there something I can do to make this dynamic?
Ben
Forum: Fixing WordPress
In reply to: Browser address display permalinks and not idBut when you navigate to my blog page the php id thing gets displayed in the address bar, this is what I am trying to change to the word blog
like this;http://www.bentonphotographic.com.au/berlin/blog
If you try to navigate there you get the following message;
This is somewhat embarrassing, isn’t it?
Cheers
BenForum: Fixing WordPress
In reply to: Browser address display permalinks and not idI had not done that but I have now and it is still suffering the same problem.
I changed from;
Options +FollowSymlinks
RewriteEngine OnRewriteRule ^home.htm$ benton-photographic.php
RewriteRule ^portrait_([0-9][0-9]).htm$ portrait.php?id=$1
RewriteRule ^wedding_([0-9][0-9]).htm$ wedding.php?id=$1
RewriteRule ^gallery_([0-9][0-9]).htm$ gallery.php?id=$1
RewriteRule ^event_([0-9][0-9]).htm$ event.php?id=$1
RewriteRule ^industrial_([0-9][0-9]).htm$ industrial.php?id=$1
RewriteRule ^contact_([0-9][0-9]).htm$ contact.php?id=$1
RewriteRule ^wed_([0-9][0-9]).htm$ wedding-page.php?page_id=45to:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /berlin/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /berlin/index.php [L]
</IfModule>Regards
Ben