Quote:
|
When looking at your website the slug titles show up at load. This is not happening on my site.
|
First off, I am using a .htaccess file to make the post slugs load without showing index.php
Creating a .htaccess file in your pixelpost directory with this code should do the trick.
Code:
RewriteEngine On
# Post Slug Addon
RewriteRule ^([a-z0-9-]+)$ index.php?photoslug=$1
Secondly, I have my previous next links setup like this:
HTML Code:
<span class="image-previous"><a href='<IMAGE_PREVIOUS_SLUG>'>Previous</a></span> <span class="image-next"><a href='<IMAGE_NEXT_SLUG>'>Next</a></span>
You can also use that previous link for the image link as well.
If you want to do a post slug permalink, use code similar to this:
HTML Code:
Permalink Code:
<a href="index.php?photoslug=<IMAGE_SLUG>">Permalink</a>
or this if you are useing the .htaccess code:
HTML Code:
[html]Permalink Code:
<a href="<IMAGE_SLUG>">Permalink</a>
[/html]
Quote:
If the future I will be adding a current link. I am thinking of using this
<a href="index.php" title="Current">Current</a>
Is there a better way of doing this using slug?
|
That way works, but this way is even cleaner:
HTML Code:
<a href="/" title="Current">Current</a>
Maybe it's just me, but I prefer all my links to be as simple as possible. :-)
I'm not currently using the Google maps addon, but this should work...
PHP Code:
$query = mysql_query("SELECT id,datetime,slug FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime<='$cdate') ORDER BY datetime desc ");
while(list($id,$datetime,$slug) = mysql_fetch_row($query))
{
$datetime = strtotime($datetime);
$datetime =date("Y-m-d",$datetime);
$output .= "
<url>
<loc>".$cfgrow['siteurl']."index.php?photoslug=$slug</loc>"
You could also modify that url if you are using .htaccess
Hopefully that answers you questions.
Feel free to post again if you need more assistance.