Questions tagged [paths]

The tag has no usage guidance.

0
votes
1answer
10 views

I can't load my images from a js file using wp_localize_script

I am using a slider to show my images that works fine on my sit but when I converted my site in to a wordpress theme it started giving me troubles on loading the images, slider is active but images ...
0
votes
1answer
76 views

What is procedure to let set path in wordpress?

I have installed a plugin called jsmol2wsp. Now I have a cif and many kinds of file in which I have to upload this files in the wordpress and set the path according to link. I have set the path ...
1
vote
0answers
41 views

Alias 'wp-content' directory to something shorter (framework?)

I recall seeing this as a feature of a Wordpress Development Framework, so I know it's possible (can't remember the framework). I am interested in how to condense the Wordpress-generated urls to ...
0
votes
0answers
40 views

Right path for renaming a file in uploads folder

I wrote a function in my functions.php which automatically renames images in the uploads folder of WordPress with [rename()][1]. I tried different solutions but I always get the error No such file ...
0
votes
0answers
9 views

Multisite subfolder - custom definition of a root subfolder path

Fortunately, I have stumbled with the task of allowing slashes in root path of a subfolder multisite. I mean, I have a multisite wp root, and I want that my subfolder root path contains not a single ...
0
votes
2answers
30 views

'posts' table should not store the absolute image path

I'm having some difficulty in making a sandbox from a website, and one of them is that wordpress is registering the absolute path of the image in posts.guid field: http://example.com/path/image.jpg ...
1
vote
0answers
16 views

Images are searched in the wrong path

I am working on a Wordpress 4.2.2 website which has a LayerSlider implemented in the front page. The slider used to work but some modification was done and now the images are not found. The images are ...
1
vote
1answer
45 views

Changing the server path

We have a WordPress multisite set up and working fine, but now the owner wants to change the server path to a different name. Will WordPress be able to automatically continue working with the new ...
0
votes
1answer
65 views

Apply template by path/slug related to custom post type?

I have a custom post type called "project" and an accompanying single view template labeled single-project.php On the landing page for each project, I have sub-navigation that points to separate sub-...
0
votes
2answers
36 views

Register additional wp plugin directory

I'm trying to register a subfolder as a plugin path, where my company would keep it's own plugins (e.g. wp-content/plugins/company-name/). I've already found, how to redefine the plugin path with ...
1
vote
1answer
23 views

Theme in wp-content but my index.php search theme files in root

My file is in i.e in domain.com/wp-content/Themename/css/cssfile.css But for example css files are looked in domain.com/css/cssfile How to change this? The site isn't loading anything properly ...
-1
votes
1answer
615 views

Back button to previous page and breadcrumbs

I must add back button only on one page and only when I get to this page from one specific. If I on B Page and go to A Page -> display button od A Page but if I on C Page and go to A Page - button ...
0
votes
1answer
67 views

Correct Plugin File Path

Warning: require_once(/assets/MCAPI.class.php): failed to open stream: No such file or directory in /home2/....../wp-content/plugins/bplugin/shortcodes.php on line 148 Fatal error: ...
1
vote
1answer
71 views

Why is server preventing admin styles? (Was: Where are WordPress sessions saved?)

[Note: I'm keeping the following opening paragraph here for posterity, but this is no longer a session issue - something wrong on the server is preventing CSS from displaying.] I asked this question ...
0
votes
0answers
32 views

How to change img src in home-made theme, using Wordpress` live customizer?

I have a home-made slider based on css that is sliding my 'hero' section. I would like to be able to change img src from wordpress panel control, rather than changing html.
0
votes
1answer
32 views

Hardcoded paths in my plugin

Sorry for the stupid question: I'm trying to create a basic plugin and from its main file I want to refer files in two directories that are in the same directory as the main plugin. I tried to ...
1
vote
1answer
74 views

Migrating a File from Plugin to Theme and changing its path → instead create a REST endpoint

<?php echo plugins_url().'/jamesplugin/assets/library/classes/process_mailchimp.php';?> The above is path of a file that is kept in a plugin, but I want to transfer that file to a theme say ...
1
vote
2answers
69 views

Components used in Themes and Plugins: How to get file URL?

In my projects I have some components which I use in a lot of custom Plugins as well as in some custom coded Themes like e.g. admin image or video selectors. Those I am holding in custom git ...
0
votes
1answer
21 views

Get not the full path

I'm developing an plugin which downloads an image from an FTP server and places that image in a subfolder of the plugin (like: wp-content/plugins/ftpdownload/download/:id"/image.jpg, where :id is the ...
0
votes
1answer
271 views

Relative path not working at all in WAMP local environment

As you can see from below, the logo is in the same folder as header.php. I do the relative image reference in header.php by img src="logo.png" Its not working. Please help Thanks
3
votes
1answer
2k views

Hook filter to change wp_upload_dir() path in multisite

The upload directory and URL paths are stored in the options database. You can change them using update_option(): update_option( 'upload_path', ABSPATH . '/path/to/uploads' ); update_option( '...
0
votes
1answer
1k views

Img src path from wp-admin

Hi guys I have a quick question: My path which I used for images in the php-files locally was something like this: src="<?php echo THEME_IMG_PATH; ?>/icons/cv_icon.png" But from the wp-admin ...
0
votes
1answer
149 views

Unexpected plugin_dir_path Output

I am developing locally and have a problem with this code: plugin_dir_path( __FILE__ ) . 'ben/' If I echo this out it is: C:\xampp\htdocs\plugintest\wp-content\plugins\my-plugin\admin/ben/ If I ...
1
vote
3answers
2k views

How to inject custom url path for page ?

Is it possible to make custom URL path for pages ? The current page url is http://localhost.dev/insight which I need to show like http://localhost.dev/city/local/insight are any option in wordpress ...
0
votes
1answer
62 views

How to have a custom URI path for specific page template

I have a custom template file called page_system.php. I have a page in Wordpress called "System" which uses this template. The path to view this page is: www.mysite.com/system/ I want a way via ...
1
vote
1answer
89 views

WP Paths in a Plugin - how to include

I'm working on my first WP plugin, and I'm having trouble getting a file include to work. My directory structure looks like this: myPlugin classes templates css js myplugin.php My main plugin file ...
0
votes
1answer
364 views

get_attached_file returns wrong path after changing media upload dir

I've changed the default WordPress media upload dir (http://example.com/wp-content/uploads) to (http://example.com/uploads). Everything is OK and media files are uploading and showing correctly. But ...
0
votes
1answer
16 views

What setting should I configure to move new site folder?

I have a live site and a new wordpress site. The new wordpress site is ready to replace the live site. I want to move the new site folder /public_html/wordpressnewsite to /public_html/ but I afraid ...
5
votes
2answers
4k views

How to display a raw HTML page (bypassing WordPress theme, scripts, etc)

I'm a software engineer with a WordPress site with hundreds of pages, and it's working very well. There are certain cases, however, where I'd love to be able to code my own page with no interaction ...
1
vote
1answer
5k views

Problem with loading images from child theme CSS file with relevant path

I am getting an issue with loading relevant images within CSS file from a child theme directory. I placed - Sites: example.com OR sub-domain.example.com body{ background-image: url(/wp-content/...
0
votes
3answers
3k views

Plugin base URL

In a question that is related to, but not the same as, How to link to images in my plugin regardless of the plugin folder's name plugin-folder/plugin-main-file.php plugin-folder/images/ ...
0
votes
1answer
295 views

Difference between how to set path to the theme folder

I crate many wordpress based sites. When i need to include path to the theme folder, i use this code <?php bloginfo('template_url'); ?>. I`m Theme check plugin. And they say to me bloginfo('...
0
votes
2answers
1k views

php - Plugin/theme relative PATH/URI

I would like to get relative path from a php file without knowing the absolute path. I have succeeded to do it but for a reason which I don't know, on some servers (in rare case) it doesn't work when ...
1
vote
2answers
545 views

Get the path of the first attached media (single.php)

I'm currently developing a wallpaper website using WordPress and I'm trying to figure it out how to retrieve the path of the first attached media in the post so I can display the path in the post (e.g....
1
vote
1answer
34 views

Can I have /blog and /foo and /bar all point to the same blog?

I currently have wordpress installed in its own directory and serving content for URLs beginning with /blog. So all my wordpress content is served from URLs like these: http://www.superfantasticsite....
0
votes
1answer
860 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
2answers
171 views

How to add a breadcrumb to WordPress header?

I would like to display the other paths/pages which are before the current site, plus the current site as you can see here. I searched the web and I couldn't found something. It may also be that ...
0
votes
1answer
96 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 ...
24
votes
2answers
21k 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?
-1
votes
1answer
2k 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
756 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
3answers
712 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
71 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: url("/wp-content/themes/flawless-v1-17-child-01/images/Logo-B-...
3
votes
1answer
831 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
1answer
5k 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 ...
2
votes
1answer
8k 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 + "</...
0
votes
1answer
108 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 ...
1
vote
1answer
5k 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: [filepath-to-my-...
3
votes
1answer
39k 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
15 views

What paths does WordPress use for itself on a domain?

I own a domain, www.mydomain.com, where I publish solitary webpages on some path - i.e. www.mydomain.com/mycustompath1/ , www.mydomain/mycustompath2/ , etc. Currently there is no content in the root ...