Questions tagged [plugins-url]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
100 views

Automatic short URL in posts

I have a domain for (maindomain.com) which my site is running on it, I want to automatically add short URL at the end of each post. 1- I want to use another domain for short links 2- I want to have ...
Siaavash's user avatar
0 votes
1 answer
59 views

WP_PLUGIN_URL equivalent

I am using a plugin that uses WP_PLUGIN_URL and that cause mixed content issues. This is the line of code: <img src="<?php echo esc_url( WP_PLUGIN_URL . '/plugin-name/images/icon1.png' ); ?...
PlainH2O's user avatar
0 votes
0 answers
50 views

Fail on admin_enqueue_scripts when I try it to upload a CSS file to my WordPress Plugin

I currently doing a WordPress Plugin and I am successful when I try to put CSS or JavaScript on the frontend but I don't know on where I fail when I trying to do the same on backend side, this is my ...
Manuel's user avatar
  • 1
0 votes
1 answer
57 views

Getting back a permalink from custom url

okay i have made my own rewrite rule, with the add_rewrite_rule function in wordpress to get a custom url, for an plugin page. add_action( 'init', function() { add_rewrite_rule( 'login/?$', 'index....
bymem's user avatar
  • 11
1 vote
0 answers
88 views

Why Wordpress plugin url ajax doesn't work?

I need to send information to the plugin folder via ajax. Wordpress has a function for the link "plugin_dir_url (__ FILE__)" which works properly but if I put it in ajax it doesn't work. Function: ...
maja's user avatar
  • 19
0 votes
1 answer
412 views

Insert Current URL into MailTo link in wordpress

I'm trying to figure out a simple way to "grab current URL" and use mailto link such as: <a href="mailto:email.com?subject=Booking%20Request%20%value%&body=Hello%20Daisy%2C%0A%0AI'm%...
Andre YPB's user avatar
1 vote
1 answer
283 views

URL parsing - what is it?

I am reading the conversation about WP_USE_THEMES and I don't understand the term 'URL parsing'. Can someone please explain that to me in the context of Wordpress ? Google didn't produce significant ...
Rebecca Johnson's user avatar
0 votes
1 answer
168 views

WooCommerce or any other plugin: Deliver JS and CSS through CDN without using a Plugin

I have a straightforward question: How do I change the links (base URL) of the JS and CSS assets provided by WooCommerce (or any other plugin) in order to use a CDN? The only requirements I have: I ...
manifestor's user avatar
0 votes
0 answers
273 views

plugins_url not returning correct directory

This plugin works on my live wordpress instance. However, on my local machine, none of the javascript is getting triggered. I think it has to do with plugins_url and it most likely not returning the ...
Hani Honey's user avatar
1 vote
1 answer
511 views

Is there a way to dynamically get URL as a path to plugin root, not a local path?

Is there a way to get path to the root plugin folder as a remote URL instead of a local path. For Example: Instead of: c:\xampp\htdocs\wordpress\wp-content\plugins\my_plugin\ I want to get: localhost/...
davidarist's user avatar
1 vote
2 answers
273 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 ...
Blackbam's user avatar
  • 535
0 votes
2 answers
4k views

404 when enqueue_script using plugin_url

So i'm adding a script into my site via functions.php that lives in the plugins directory. The code is pretty straightforward: function add_jq_script() { wp_register_script('r_footer', ...
heliotrope's user avatar
0 votes
3 answers
236 views

Change default url to plugin custom post type

I have a custom post type in my plugin "Luckydraw" as 'voucher'. By clicking on post link, wordpress generates its URL as : http://localhost:81/luckydraw/index.php/voucher/testing-2/ But I want to ...
TMA's user avatar
  • 200
4 votes
1 answer
1k views

Security in WordPress plugin development

My plugin is Mailer.app for WordPress, I'm 85% completed and I'm focusing on security before release. Before the questions, I should outline the plugins architecture: The plugin is able to take in ...
Kivylius's user avatar
  • 143
0 votes
2 answers
2k 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 ...
freaky's user avatar
  • 99
-2 votes
1 answer
40 views

How to make a rest style plugin?

I created a plugin that is basically a crud to write to the mysql database. I want to know how to display the data on a wordpress page. I'm reading about url rewrites but it seems rewrites are for ...
jaysg's user avatar
  • 1
0 votes
1 answer
475 views

Add URL Rewrite Rule To Wordpress

my link http://localhost/abm/?ct_city=la-jolla&search-listings=true i want to this http://localhost/abm/USA/la-jolla Could you help please.. htpaccss file # BEGIN WordPress <IfModule ...
user83702's user avatar
0 votes
0 answers
32 views

Template included with plugin doesn't return all posts for custom taxonomy

I'm in the process of developing a plugin with a custom page template (using template_include) with a loop that retrieves all posts with a custom taxonomy. I tested the code using the same templates ...
tnog's user avatar
  • 205
0 votes
1 answer
642 views

add custom entries to menu options

The menu options in WP already have support for created native posts types, and custom post types, and existing taxonomies. But in my plugin I provide a couple custom URLs that are not associated ...
user avatar
0 votes
1 answer
4k views

Sharing /wp-content/ folder between different WordPress Multisite installs?

I have four different Wordpress multisite installs which I would like to keep separate for good reasons, but I would be happy if I could share at least some of wp-content. Is there a clean way to get ...
Brokenstuff's user avatar
1 vote
1 answer
1k views

plugins_url() incorrectly returning wp-include directory

I doubt there's a bug with plugins_url() but this is some odd behaviour I'm seeing. I have the following in an activated plugin function include_masonry() { wp_enqueue_script( 'masonry', ...
Archonic's user avatar
0 votes
1 answer
58 views

How do I link an image in my plugin so it displays on WordPress?

I'm creating a plugin for a college project. The plugin is very simple: it searches for name of the site address and upon finding it in a post, it outputs the site address with an image. However, I ...
Connell Gray's user avatar
2 votes
1 answer
5k views

Dropzone.js and wordpress plugin

I'm currently using Dropzone.js within a personal plugin and I'm able to create the dropzone, however when I pass in plugins_url as the action I'd like to get the files and add them to the wordpress ...
Sythen's user avatar
  • 23
0 votes
0 answers
41 views

How to tell if a script is being executed from a plugin, a theme or a child theme in WordPress?

I have a framework for WordPress that can be embedded into either a plugin, a theme or a child theme. In order to return proper URLs, the script needs to determine from where it is being executed. I ...
asked Feb 12 '12's user avatar
0 votes
2 answers
2k views

What's wrong with my use of plugin_url()?

I keep getting the following message in the browser Fatal error: Call to undefined function plugin_url() in My code at present: add_action( 'wp_enqueue_script', 'load_jquery2' ); function ...
user avatar
0 votes
1 answer
2k views

reCAPTCHA on page template without plugin

I have a template for contact us page which includes a small form with few text fields. I want to add Recaptcha to avoid spams. I already use WP-recaptch plugin which only works for default ...
user2341459's user avatar
0 votes
1 answer
394 views

How to use plugins_url() inside PHP stylesheet file [duplicate]

I created a plugin and use php file as stylesheet file PHP style sheet file: <?php header('Content-type: text/css; charset: UTF-8'); $x_position = 0; $y_position = -40px; ?> ....
usama sulaiman's user avatar
1 vote
2 answers
2k views

plugins_url('',__FILE__) != WP_PLUGIN_URL with sym links

For one of my many sites, plugins/plugin-name is a sym link pointing to universal-install/wp-content/plugins/plugin-name. echo WP_PLUGIN_URL displays what I expect. echo plugins_url(); displays what ...
ITS Alaska's user avatar
-3 votes
1 answer
59 views

Change from blogger to wordpress

I would like to change my blog platform from blogger to wordpress. My website is: http://www.hdpeak.net I would like to keep a similar template and all the posts. What are the necessary steps I ...
HDPeak's user avatar
  • 1
0 votes
2 answers
562 views

Widget redirecting to home page

Am trying to create a widget that searches for names. The searching and all that is fine, but when I hit submit, I get returned to the front page. I tried messing with the action="", but no matter ...
Hybride's user avatar
  • 101
0 votes
1 answer
3k views

check if a file in a plugin folder exists from a locale installation

I need to check if a file exist in my plugin dir: if (fileexists) { ... } else { ... } However, if in place of fileexists I use file_exists(WP_PLUGIN_DIR . "/myplugin/myfile.ext") it returns always ...
Toc's user avatar
  • 227
0 votes
1 answer
654 views

plugins_url() works everywhere but wp_reqister_script()

So I should probably mention up front that I'm developing a plugin so my url is 'mysite.com/plugin' (Just in case this is related to my issue. So, In my main plugin file (myplugin.php) I have added ...
ItsGeorge's user avatar
  • 133
4 votes
2 answers
4k views

Add forward slash on categories url (serve one version of a url)

How can I a add forward slash on categories URLs and serve only that version of a category (meaning URLs not ending in forward-slash will redirect to URLs ending in forward slash). I manage to remove ...
user983248's user avatar
  • 1,350
17 votes
1 answer
33k views

How to call images from your plugins image folder?

I've done a lot of research and learned a lot about WP constants and function usage for getting image paths etc. but still my original problem persists. <img src="<?PHP echo WP_PLUGIN_DIR . '...
Ben Racicot's user avatar
  • 1,406
0 votes
1 answer
54 views

Make custom system url

Let's say my site is example.com I want to create example.com/portfolio without creating a page. I just want to execute some PHP code and display a bit of HTML. Is there any way to create "sytem ...
Paul Etienney's user avatar
1 vote
1 answer
753 views

Access bloginfo, get_option, and plugins_url from a non-core php file

I am creating a plugin that has a php file in the plugin directory which is accessed directly via a custom rewrite url. I need this file to be able to use the three functions mentioned in the title. ...
Sarathi's user avatar
  • 284
0 votes
0 answers
347 views

Wordpress Plugin function callback by URL [duplicate]

Possible Duplicate: How to Rewrite Wordpress URL for a Plugin I'm creating a plugin for Wordpress. Is there any way or API to make plugin receive a path or URL so that it can trigger or output ...
Lee's user avatar
  • 109
2 votes
2 answers
5k views

plugins_url() incorrectly returns a url with www subdomain

I'm working on a plugin which we'll call "my-plugin" for the purposes of this question. The my-plugin directory looks like this: my-plugin/ |- image.jpg |- script.js |- script.php |- plugin.php |...
sholsinger's user avatar
2 votes
1 answer
1k views

plugin_dir_url() adds path to url

For some reason I get the following output from var_dump( plugin_dir_url( __FILE__ ) ); http://local.dev/wp-content/plugins/C:/development/xampp/htdocs/vanilla/wp-content/themes/twentyeleven/ in ...
kaiser's user avatar
  • 50.6k
0 votes
3 answers
3k views

URL rewriting for WordPress Network (Multisite) subsite

We have an install of WordPress Network (Multisite) that has multiple blogs running under the url blogs.exampleurl.com where each subsite is blogs.exampleurl.com/site1 /site2 etc... We have a user ...
Jason's user avatar
  • 125
1 vote
2 answers
203 views

Are there functions for file paths, instead of just urls

Is there any equivalent to functions like plugins_url() and content_url() that give you either the relative paths or the file path. For instance, instead of http://localhost:8888/wordpress-3.2/wp-...
tollmanz's user avatar
  • 5,500
8 votes
1 answer
29k views

Posts URL structure like site.com/category/the-post-title

I'm new with wordpress and I would like to understand better if it's possible to create pages with an url based on the category and then the post title, so: something like http://mysite.com/category-...
vitto's user avatar
  • 222
4 votes
1 answer
2k views

Is it safe to pass directory path to plugins_url()?

plugins_url() function accepts plugin slug or file path to build URL for. I have following directory structure: /wp-content/mu-plugins/someplugin/css/file.css /wp-content/mu-plugins/someplugin/...
Rarst's user avatar
  • 99.7k