ive been looking at
the_ID
the_title
Ive changed my page name to stuff.php in pretty permalinks
Can someone tell me how to get get "stuff.php" on to the page ?
the_ID tag doesnt seem to give the result ??
thanks
ive been looking at
the_ID
the_title
Ive changed my page name to stuff.php in pretty permalinks
Can someone tell me how to get get "stuff.php" on to the page ?
the_ID tag doesnt seem to give the result ??
thanks
Depends on your code, but in a 'typical' loop probably could use:
echo $post->ID;
echo $post->post_title;Michael
Instead of "Stuff" on page, I am trying to get "stuff.php" (actual file name) and im just adding that code into header.php as a template tag.
as in <?php the_title(); ?>
if i put
<?php
echo $post->ID;
echo $post->post_title;
?>
into template i get
1545
Stuff
Can you elaborate on how you would get "stuff.php" on page. (actual pretty permalink post page name).
thanks
Like this from wp-content/themes/default/index.php
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>Michael
the post title is "stuff"
the post number is "1545"
but the actual post (page) name in "stuff.php"
( i set this up in pretty permalinks )
Do you know how I can get "stuff.php" actually on page as a template tag ?
Did you get a chance to look at the_permalink tag I used in the above example?
yes
it gives a link to "stuff.php"
but the words on page are still "Stuff"
Link to see problem required ;)
Michael
Thanks ever so much. I didnt put 2 and 2 together as I should have...
what im really hoping to do is just call "stuff.php"
The <?php the_permalink(); ?> returns http://domain.com/directory/stuff.php
have you any ideas ?
Michael
In the end I did this with a routine to relate post number to "stuff.php"
Thanks ever so much for your help.....
This topic has been closed to new replies.