The tag has no wiki summary.

learn more… | top users | synonyms

10
votes
2answers
1k views

Symbolic Links on dev box with plugins and stylesheets

I'm using mac os x 10.6 with xampp. http://wp3.1/ is the url to where I have WordPress installed. The physical path is /Users/myUserName/Sites/wp3.1/ I do not install plugins or themes in the ...
9
votes
2answers
21k views

How to get the path to the current theme?

This code is used to get the directory of the current plugin: plugin_dir_url( __FILE__ ). What should I use to get the directory of the current theme?
8
votes
1answer
207 views

What's the difference between get_home_path() and ABSPATH?

What's the difference between get_home_path() and ABSPATH? Isn't the point of both to point to the WordPress install root?
5
votes
1answer
5k views

Change the path where wordpress plugins are uploaded

Currently my plugins are getting uploaded to public_html/sitename/wp-content/plugins instead of public_html/wp-content/plugins. Is there any way that I can change the path where word press uploads the ...
4
votes
3answers
2k views

Setting a custom sub-path for blog without using pages?

Warning: fairly pedantic request ahead. I have a design that makes use of posts (I.e., the blog) and a custom post type called "howto". The site front page ("/") has a template that displays the ...
4
votes
1answer
5k views

show current navigation path from menu

I want something like this Home > Products > Steel > Nails This information should come from the menu structure! I installed Breadcrumb NavXT but it seems that it only takes the path I defined (this ...
4
votes
1answer
196 views

Which method is best to enqueue scripts

I'm currently authoring the development of a plugin for wordpress, and I'm having trouble figuring out which would be the best way to add scripts to the plugin. I'm in the process of adding more ...
3
votes
1answer
191 views

Display posts for a single post format

I saw a a url path to display all posts of a particular 'format' a few weeks ago, but I've lost the link. Does anyone know the path? It will be something like mywebsitex.com/format/image Works ...
2
votes
2answers
1k views

Why doesn't WP_PLUGIN_DIR definition use DIRECTORY_SEPARATOR?

Whilst writing some code that backs-up a plugin, I hit a problem with 'the wrong kind of directory slash' on my windows dev environment. Tracking it through I find in default-constants.php:91 ...
2
votes
2answers
1k views

Get uploaded image url

I am working on a plugin that constructs a newsletter witch uses a template with a few images. The images have been uploaded using the Media Library (uploads/current_year/current_month/) and I want ...
2
votes
0answers
589 views

How to get WordPress to save upload file beyond web root

I am using nginx on a multisite install. I am trying to get WordPress to save uploads to a folder beyond the webroot : /home/mydomain/file_secure as opposed to ...
2
votes
1answer
363 views

Remove 'wp-content/themes/themename/' from Image path

I'm currently moving an old website based on some other CMS towards a new server, with WordPress. However, the site ranks good on Google, and I'm have to keep all the link structure, including the ...
1
vote
3answers
5k views

theme path in javascript file

I need to include the path to my theme file within a javascript file. How would I go about this? I have already tried: var templateUrl = "<?php get_stylesheet_directory_uri(); ?>"; function ...
1
vote
1answer
2k views

Retrieve Path of admin.php

Is there a better way of retrieving the path of admin.php and the url of wp-admin.css? What I can think of is: $adminphppath = ABSPATH . '\wp-admin\admin.php'; $admincssurl = get_bloginfo('wpurl') . ...
1
vote
1answer
4k views

ABSPATH not working! Any idea why?

This is what in my wp-config.php : if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); I am calling from plugin/pluginName directory to : require_once( ABSPATH . ...
1
vote
1answer
853 views

plugins_url function mixes system path and URL

In my WordPress widget I use the following code: wp_register_script('jquery-ui.widget', plugins_url('assets/js/jquery-ui-1.9.2.widget.js', dirname( __FILE__ ))); Unfortunately, the code gives me an ...
1
vote
1answer
311 views

issues including a file from a plugin directory

I have a processForm.php in theme directory that does what it says. I am trying to include a file (which i need in order to run a specific function in processform.php) from a plugin directory and have ...
1
vote
1answer
205 views

How to call plugin path in JS?

I am using wp-store-locator plugin and I want to add plugin directory path to my JS. html = "<li data-store-id='" + id + "'><div><p>" + storeImg + "<strong>" + store + ...
1
vote
1answer
110 views

Get posts from taxonomy URL

How can I get the posts from a custom taxonomy using the URL to determine which taxonomy term id is being shown? I tried to get posts via a category using get_category_by_path which returned false ...
1
vote
1answer
623 views

What is the correct way to convert the absolute path of the executing script to a URL, in WordPress?

In a nutshell, my question is "How do I convert the absolute path of the executing script, e.g., /home/content/xx/xxxxxxxx/html/wp-content/plugins/MY_PLUGIN_DIR/MY_PLUGIN/MY_PLUGIN.PHP or ...
1
vote
1answer
103 views

How do I test my localhost WordPress project with VirtualBoxVM?

I'm working on a WordPress project set up with MAMP on localhost. I try testing the site on internet explorer with VirtualBoxVM by browsing to my local ip. My problem is, wp_head() outputs absolute ...
1
vote
0answers
134 views

Using arbitrary paths in page urls

I have been looking all over the place and maybe I'm just searching the wrong terminology but I need to be able to allow an end user (completely non-technical) to add an arbitrary path to the url ...
1
vote
0answers
430 views

Why can't the WP-CLI installer find my php.ini?

I am trying to install WP-CLI on my Mac using the standard installation command (found here: http://wp-cli.org), yet I am receiving the following error message: #!/usr/bin/env php Some ...
1
vote
1answer
239 views

Current path on page in functions.php

How can I get the current path of my page? I know how to do it inside a template file, but I need it inside functions.php. And it has to be before the send_headers hook, because I'll use this info to ...
0
votes
2answers
845 views

Change path of the page's template

It's possible to create templates for pages with that: <?php /* Template Name: Contact */ ?> This templates are located on the theme folder, right? Is possible to change the default path where ...
0
votes
1answer
852 views

wp_enqueue_script not loading my custom js file

I am using the following code below in my functions.php, However app.js is not found when I inspect it in the resources tab. It is looking for it in ...
0
votes
2answers
1k views

hijacking home_url for root relative paths

I'd been having trouble with the full domain name being written into the path of links and assets. Basically localhost:XXXX works fine, until I try to reach my site from a Virtual Box install of XP or ...
0
votes
3answers
68 views

Images give 404 after changing default domain

Never encountered this issue before. So I've just moved a site for a client to another server and for some reason all images give me a 404 when I change the default domain in the database (siteurl and ...
0
votes
2answers
33 views

WordPress login page logo customization

For some reason the first code works. But the second does not. And I can't figure out what is wrong with my syntax. background-image: ...
0
votes
2answers
2k views

When moving a WP site, why does wp-admin redirect to old site?

I am in the process of moving a WP site from one host to another. I copied the database and all the files, created a new database and imported the old one. I then changed the wp-config file. The home ...
0
votes
1answer
3k views

How do I 'rebuild' the WordPress Media library after transfer to new host?

I recently inherited a large site from a developer that vanished. The site has more than 6,000 images. In the pages most of the images are missing, however, they are referenced in the media library ...
0
votes
1answer
143 views

Slashes stripped in ACF

Use ACF pluging to save a windows path like this : c:\users\thanassis\photos using a text field. The ACF saves this : c:usersthanassisphotos as path except the character \. If I use this / it's ok. I ...
0
votes
1answer
20 views

How to change the path to a WP MU site?

My WP MU site is at http://www.mydomain.com/mymu/. I would like to change it to http://www.mydomain.com/somethingelse/. Can I just open up FTP and rename the folder or will that cause any issues?
0
votes
3answers
3k views

Absolute Path (ABSPATH) in WordPress is not working

I am currently working on a small task that store a plugin information into database, but I have problem regarding to include the file that has the functions to run the query. Here is the line that ...
0
votes
1answer
61 views

Wordpress VIP realpath Alternative?

I am running a scan for a site to be proposed to wp vip. The only error I am getting is : Warning: Returns canonicalized absolute pathname header-payroll.php require_once ...
0
votes
1answer
78 views

Is it possible to have a Theme with built-in physical page files?

I am creating a theme and was thinking if it would be possible to create pages within my theme folder that would reflect the wordpress url + path. So for example I could when accessing: ...
0
votes
1answer
359 views

Create a Custom Path to Archive

To get at archive pages (by default) the path is /%category%/ Which is fine. But how would i change it to have a static string prefix before the category variable (e.g. /archive/%category%). Same ...
0
votes
1answer
283 views

Loading Images from Javascript on the Front End

I'm getting some 404 errors on image paths in this plugin I'm building. I'm trying to build a plugin that has some Javascript and images (like a close icon and a progress bar) that I want to load on ...
0
votes
1answer
799 views

How to declare/provide file path in JQuery which is emeeded in the Wordpress theme

How to give the source location path in the jquery code, where my file is in cah-new/wp-content/themes/theme_name/includes/func.php and i have to give that path in the jquery code ...
0
votes
1answer
1k views

Replace image urls(absolute instead of relative) by using filter in single page

I'm using a plugin called Foliopress WYSIWYG. While using this plugin, images found in the_content loop using relative image path instead of absolute paths. So all the feed images looks broken. This ...
0
votes
1answer
2k views

Path Issue - Getting “localhost” instead the IP

Okay, currently I'm trying my WP Theme/Plugin development on LAN so that it can be accessed with multiple devices. What I noticed recently is that the way I include the CSS files makes them not to ...
0
votes
0answers
7 views

Domain mapping breaks some plugin scripts and css

Here is the context: I have a sub domains wp mu install with wp-content in a different location and using the domain mapping plugin. WP and all my plugins are up to date. There is no https involved. ...
0
votes
1answer
24 views

Rewritten URL not loading WordPress environment

I have a page that I am sending users directly to so I can serve them a PDF dynamically created using the FPDF library. Since I'm sending them directly to the file which generates the PDF, I'm ...
0
votes
0answers
43 views

Multisite - change path of current site

I've got a multisite with a site that has a path /sites/A. I'd like to host it as follows /sites/department/A. However when I change the Path under Sites > Info to /sites/department/A (and tick the ...
0
votes
1answer
131 views

Background image appears on localhost site but not online

I am developing a WordPress theme and the background image appeared fine on the local MAMP server. It refuses to appear once I upload the theme into a demo site, however. I've tried every type of path ...
0
votes
1answer
29 views

Relative URLs within site

I want to link to a page inside a website so the url I want to link to is this: http://www.example.org/about-us/team when I set a link like that: <a href="about-us/team">Our Team</a> ...
0
votes
0answers
20 views

How to change where WordPress is looking for uploaded files?

I have a multi-site setup. My main site's theme changed the uploads folder to /media, problem now, is I added a subdomain site, and when I upload a file, it still uploads to /media, and wordpress is ...
0
votes
1answer
614 views

Wrong path for theme assets

I'm working on a WordPress project, starting from Mark Jaquith's WordPress-Skeleton repository, using MAMP. I cloned the repo, updated the WordPress submodule, created a database and updated the ...
0
votes
1answer
33 views

Theme parts path location dump

Few months back I was working on customizing theme that I was assigned to. I remember that I used some function or define something in the config or theme functions file and than it displayed debug ...
0
votes
1answer
473 views

Programmatically add a custom page/path/url/route to WordPress

Conceptually what I want to do is super simple. In my plugin, I want to add a single path/route to my wordpress site: [mysiteurl]/testpath ... that loads a particular file, like: ...