How do I get a link to a WP page within a loop?

So, it turns out that if you pass a Post or Page object to the_permalink() or get_page_link() it will override the post object set by the loop whereas passing an ID won’t. In the previous example you would use <?php echo get_page_link($mypage); ?> instead. Source of get_page_link() had the answers: https://developer.wordpress.org/reference/functions/get_page_link/

Not recognizing my custom templates in hierarchy

If you register a taxonomy named projects, and create taxonomy-projects.php, the URL mysite.com/projects will not exist. There is no such page in WordPress. If you create a term inside inside that taxonomy, “My Project”, that term will be accessible at mysite.com/projects/my-project and that URL will use taxonomy-projects.php to list all posts that belong to that … Read more

affiliate linking from wordpress [closed]

I wrote a plugin (“AmazoLinkenator”) that automatically adds your Amazon afilliate link to all Amazon links – overwriting any existing Amazon affiliate link that others might place in a comment. The techniques in there could be added to to do other affiliate places. Found here: https://wordpress.org/plugins/amazolinkenator/ It has options to shorten via Bit.ly your links, … Read more

Blog url disappears

Because this is how WP is set. You have set your permalinks structure to /%category%/%postname%/ so when you click on a post link, you will have that post /%category%/ and then /%postname%/. I guess you wished to have a structure like /blog-page/%category%/%postname%/. well just add this to your permalink settings /blog-page/%category%/%postname%/.

Can’t find permalinks section under “Settings”?

WordPress.com is a hosted installation of WordPress and doesn’t allow you to edit things such as permalink structure, or any code other than css. Sounds like you need to get a WordPress install running on another server, Here’s a how-to https://codex.wordpress.org/Installing_WordPress then you’ll have access to edit your permalinks, .htaccess file etc.

URL issues with WordPress

This is not fixable, and there are good reasons for this. Say we had a post with the slug ‘apple’, resulting in /category1/apple. What your question is asking, is how would we add another post with an identical slug, such that it’s URL was /category2/apple? If this was done: If you referred to the post … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)