![]() |
Can I post enquiry here?
Hi, I am new to this community and I am not advance in php.
I want to fix an error with a website link. The code in php shows below. I do not know if it is okay to post a website link here so I will not post yet. Code: <a href="<?php the_permalink(); ?>"><?php _e('full post ?','DailyNotes'); ?></a> The code above shows a normal link however it is a blank page. A normal link is similar to http://______.com/post/123. A link which show the post is http://_____.com/?post=123. Hence what can I do to the code above to add a question symbol and a equal symbol in the url link? *!* |
So, if I understand it right, you want to convert a link like this http://website.com/post/123 to something like this http://website.com/?post=123?
In hard-coded simple terms it could be done with a replace of strings php Code:
|
Thank you for the reply Tony, however it did not fix the issue. Is it appropriate for me to post the website link here?
|
I am not sure, but I would say it is fine as long is not spam or trying to advertise yourself. but since you are looking for an advice/critic/help if you ant to share it you can.
|
http://pastebin.com/qmhkUzd3
Above is a page with codes that doesn't work the way it should. I am using a wordpress blogging software and I need to fix the permalink to view a correct post. Cheers. |
For clarity, this is not a PHP issue but a WordPress one. The first thing you need to try is to flush your rewrite rules and double check the permalink structure you are attempting to use, as /post/123/ is not by any means a default setup; go to Settings >> Permalinks, and choose the structure you would like to use (most commonly 'Month and name', aka '/%year%/%monthnum%/%postname%/') then click Save Changes.
After you do that, go to Posts, and hover over a post title until the action links appear. Click 'View' and your permalink structure should be working. If it's still not at this point, I would check to see if your .htaccess file was created properly (WordPress will usually notify you if it is not, but check anyways), and failing that you should check into whether or not you even have .htaccess capabilities on your host. |
| All times are GMT. The time now is 01:29 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0