Articles of urls

Check request URL for pattern

I need help. I’m making a plugin in woo which add html when URL contains a specific word. I used get_site_url, get_permalink, and others but strangely none was sending the information. Finally I decided use $_SERVER[REQUEST_URI] and works but on some pages doesn’t. Why is this happening? What can I do?

Add source URL from Feed WordPress (Syndication) plugin to a custom field in post editor

We’re using the Feed WordPress (Syndication) plugin to ingest external feeds resulting in posts published in WordPress. The plugin pulls the ‘source’ URL from the feed. We can display the source URL fine against the post on home and post page, but if the feed owner did not include a source URL, it does not […]

Creating Search Engine Friendly URL's with Word Press

I own a website which was developed by a non SEO enlightened developer. I recently had the FV All in One SEO Pack installed as my site does not show up in the search engines at all. I understand my URLs should be representative of my page content but do not know how to […]

How to reset canonical URLs / fix redirect loop

Couldn’t find anything in the related questions, so here goes: I have a post which, when viewed on the site, is returning a redirect loop. The error page is showing an address for the post that originated when the post was added to a category that was subsequently deleted. is the correct address, but […]

get_site_url is not returning anything?

I’m using the twentyten theme with the bbpress plugin. I have the following in my header.php (twentyten): <div id=”masthead”> <div id=”branding” role=”banner”> <h1><a href=”<?php get_site_url(); ?>”>TaiwanTalk</a></h1> </div><!– #branding –> <div id=”access” role=”navigation”> <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?> </div><!– #access –> </div><!– #masthead –> get_site_url doesn’t return anything. Any […]

Easiest way to simulate WordPress's URL resolution to retrieve post ID, etc?

I’m curious if it is possible, in a plugin/custom code, to take an URL that has been generated by the currently running WordPress site & parse it to retrieve the $blog_id and $post_id? ie. taking a string like “” and determining that this is post #6 (“whatever”) on blog #2 (“myblog”). I realize that I […]

Site URL always in front of other URLs

My WordPress site is having a bad URL structure when I’m adding new URL. For example in comments, when commentators fill in their website, it always has this structure The same thing happens in my side bar widget. When I add new text widget and put something like this <a href=”” title=”Find Us On […]

Using a portfolio_category slug in wordpress URL

I won’t lie – I don’t know php but I enjoy digging around trying to find ways to customize themes so that they behave how I want them to. Any help would be very much appreciated. What I am trying to do: There is a section in a wordpress theme I am using which allows […]

Confusion about how a URL is being parsed

I have a permalink that leads to some custom content like: That will take you to a page that is handled by the file: category-extra-deals.php On that page I grab the last portion of the URL (91103 in the above example) and use that to do a custom database request for the info I […]

Get closest page ID from URL

Lets say on my WordPress website I navigate to: In this case I am looking at a post in a CPT called News. What I want to do is get the page ID thats closest to that URL. I know the closest page ID can be found at: So how do I loop […]