0
votes
1answer
40 views

Create custom permalinks to show Custom Post Type's relationship?

I'm creating a WordPress site that has 3 custom post types registered: course, chapter, and lesson. All of these post types are inter-connected and share a relationship using custom fields. For ...
0
votes
0answers
45 views

How to extract URLs from wordpress taxonomies

I am in quite a trouble. I need to extract all possible url from my wordpress blog be it of post, tag, category or anything else after domian-name.tld/*. I tried my hand on few available codes and ...
2
votes
1answer
40 views

How is WordPress manipulating the posts like there are folders?

As you know, a WordPress post can usually be seen going to a link similar to this: myblog.com/2014/03/27/sample-post/ There is no folder named 2014, 03, 27 or sample-post in the blog. Until now, I ...
0
votes
1answer
143 views

Removing all my hardcoded URLs with get_site_url()

In my php files, I would like to remove all my hardcoded URLs (ex: http://mysite.com/) and replace them with the get_site_url() function. My problem is with the php code of one of my functions (in ...
1
vote
0answers
65 views

Search Query: how to construct a search string from two select elements?

Im trying to create a wordpress search widget. The final search string Im trying to submit is made up of two keywords, one each from a select element. I'd like the final search query to be ...
0
votes
1answer
105 views

Retrieve first image url from custom post with pagination

On my custom page with pagination I have 6 pictures from the last posts, so far so good. Have a look here: http:sayami.de My code: <?php global $wp_query; $paged = ...
0
votes
1answer
220 views

How do I include an external PHP file in a subdir Wordpress install?

I originally posted this on SO, but was directed this way. I have a Wordpress installation in directory /blog. I am trying to include multiple PHP files located in the root parent directory using ...
0
votes
1answer
101 views

How to add PHP pagination to wordpress

I'm trying to make a custom PHP pagination work with wordpress, the page in wordpress is a very custom one, not a post or a page, it's a select from DB that shows flowers, the styling is ok now, but ...
0
votes
1answer
918 views

Use an anchor link to open an iframe inside a Wordpress page

My Question: How do you make an anchor link to an offsite webpage that when clicked opens up the offsite webpage as an iframe that is inside a new Wordpress page where the Wordpress header and footer ...
0
votes
1answer
424 views

Adding custom url to readmore link using get_permalink()

I am having issues with a custom url. I have a page with a gallery type plugin/shortcode. Now each gallery item displayed on the page, has a readmore link, linking to that gallery item post. Now I ...
3
votes
1answer
1k views

Is it safe to use $_SERVER['REQUEST_URI']?

I've looked at other answers and I see that $_SERVER['REQUEST_URI'] is usually recommended and is the accepted answer for getting the current page URI along with $_SERVER['HTTP_HOST']. I looked at ...
0
votes
1answer
292 views

How to set base url for php widget

SO, I have some php that I'm inserting into a widget that generates a list of pdfs within a directory on the root level of my wordpress install (see "Meeting Summaries" to the right here: ...
0
votes
1answer
131 views

Magento and Wordpress URL integration

so I'm in a bit of a conundrum. I've integrated wordpress into my Magento site, currently by a subdirectory. Check it out: http://vapetropolis.ca. If you go to the "reviews" section, you'll note ...
0
votes
1answer
42 views

Comment_author_url doing nothing

I have this function: <?php function top_comment_authors($amount = 5) { global $wpdb; $results = $wpdb->get_results(' SELECT COUNT(comment_author_email) AS comments_count, ...
0
votes
2answers
56 views

Post's ID pattern?

Each post has an ID and I would like to know how they were assigned. Is there a pattern? Why are the ID's not being incremented by 1 every posts? It would be easier..My ID's go from 9867, to 9869, to ...
0
votes
1answer
984 views

Passing multiple variables through url (php)

I'm trying to pass two values to another page. Both pages are WordPress page templates. First, I pass the value as such: <tr ...
0
votes
1answer
3k views

Get URL Parameters from referer

Not 100% sure if this one classes as a php question or is specifically Wordpress... I'm implementing the Wordpress Settings API with a tabbed settings page. I've added a 'reset tab' button, but since ...
1
vote
0answers
69 views

Need help enqueueing webfonts

I am attempting to enqueue web fonts that I am loading in via the WebINK font library. (This service is similar to Typekit). This service works by generating a unique CSS link for each unique site. I ...
-1
votes
1answer
94 views

WPMU - How to echo only one URL

I have this code that I am using on a site to check if the current user has a blog on the our wp network and as of now it is echoing the URL for both the main site and their blog. I would like to ...
1
vote
1answer
212 views

Echo URL of large version of Featured Image

I use this plugin to echo the URL of a post's featured image in the header: <?php /** Plugin Name: Post Thumbnail FB header */ function fb_header() { // Not on a single page or post? Stop ...
2
votes
1answer
114 views

Wrong links in Wordpress?

I have a project on Wordpress. I would like add an article. In admin panel I click on Post, then Categories and add a new category called article. Next I add a new post and edit title, body and ...
0
votes
1answer
125 views

How to remove parent section in an attachment URL in wordpress?

In wordpress, an unattached attachment URL is http://domain.com/?attachment=$id Once after it's attached to a parent, it goes with parent's URL structure, for example: ...
0
votes
2answers
491 views

Get current Wordpress page then add #post ID to the end

I'm trying to find out the PHP code that will get the current URL and add a hash ID onto the end of it so a link can be generated and linked to. The end goal is to create a link that returns: ...
0
votes
1answer
2k views

How do I get the author's page url from their ID?

What is the best way to get the author's page url, so http://example.com/author/user73, from their ID number?
0
votes
1answer
204 views

Modifying WP URL handing code?

I am trying to use mod_rewrite and modify WordPress' URL handling to allow for passing variables to PHP from the URL while maintaining "pretty permalink" functionality. (on WP 3.2.1) Something like ...
0
votes
1answer
500 views

How to deal with a GET variable of 'name'?

I'd like to have a custom registration confirmation page live within a WordPress site. I can provide a URL for this page to an external site. When the registration is successful the URL has several ...
1
vote
3answers
1k views

Custom URL parameters in template files

SETUP I want to pull a query variable from the URL and use it on my single post template (single.php). For example: mysite.com/2011/07/29/testPost/?myvar=someValue To do so, I added the custom query ...
0
votes
1answer
164 views

Wordpress permalink issue

If i try to access my wordpress page using the native url structure i.e. for instance: www.mywebsite.com/?p=123 I am redirected to my homepage. It doesn't seem to be an htaccess issue for I tried ...
1
vote
1answer
728 views

What's the proper way to use wp_enqueue_script/style?

First, let me tell you how I'm currently doing it. I have this function. It's purpose is to take the the string of a file system path (/root/web/dir/some/path/to/file) and return the equivalent URL ...
1
vote
1answer
1k views

urlencoding of the_title() doesn't work?

hey guys, <?php urlencode(the_title()); ?>doesn't take effect. this is my entrie line of code: <li><a href="mailto:?subject=<?php urlencode(the_title()); ...
1
vote
1answer
2k views

Why does Wordpress remove my variables in the URL?

I am trying to put variables into the URL, which I can then use in my Wordpress template. So for example I have created a wordpress template something.php and the page "somepage" with this template. ...
2
votes
1answer
325 views

Add filename to attachment page url

I wan to change my premalinks to attachment pages from http://example.com/.../attachemnt/something to http://example.com/.../attachemnt/something/something.jpg It should simply add filename but with ...
4
votes
2answers
2k views

Preserve custom URL parameter on more pages

I created a custom URL parameter for sorting posts by their vote scores. I have a "most voted" link that sends a ?sort=most_voted URL paramater and using a query posts filter I display posts with most ...