Relative URLs within site
You have to add a slash to the beginning of path <a href=”https://wordpress.stackexchange.com/about-us/team”>Our Team</a>
You have to add a slash to the beginning of path <a href=”https://wordpress.stackexchange.com/about-us/team”>Our Team</a>
in line 37 of your HTML-Code you have the following declaration: #header-background, #colophon, #site-navigation { background: url(”) no-repeat center center fixed; background-size: cover; -moz-background-size: cover; -o-background-size: cover; -webkit-background-size: cover; } With Firebug I see, this is overwriting your CSS declaration, which states #header-background { background: url(“images/background-reclaimed.jpg”) no-repeat fixed center center rgba(0, 0, 0, 0); display: … Read more
Just don’t do it, you can never know if the plugins directory is even “below” ABSPATH, and you can not know the URL out of the directory path https://codex.wordpress.org/Determining_Plugin_and_Content_Directories. Just use the core api of plugins_utl etc, don’t reinvent the wheel.
You’ll need any and all references in the database to the old folder to be changed — this would be not just images but any internal links as well. If you’d rather not dive into the .sql file yourself, the easiest thing is probably to use a plugin like Velvet Blues ( https://wordpress.org/plugins/velvet-blues-update-urls/ ). It … Read more
I found the problem 🙂 Actually this is my friend’s website. I don’t have any idea how he changed the upload dir but I noticed that there is no define( ‘UPLOADS’, ”.’uploads’ ); in his wp-config.php file. I added it and it’s now working perfectly. I hope this helps other people who will facing this … Read more
You want to use plugin_dir_url(): $url = plugin_dir_url( __FILE__ ) . ‘js/my.js’;
https://developer.wordpress.org/reference/functions/plugin_dir_path/ It looks like this function adds a trailing slash, so starting your string with a slash is not required try; require_once(plugin_dir_path( __FILE__ ) . ‘assets/MCAPI.class.php’);
You can’t set a project as a base of permalink because you would have to enter rewrite rules for each one. What you can do is create a custom taxonomy related-resources: function wpse_287202_related_resources_taxonomy() { $labels = array( … ); $args = array( ‘labels’ => $labels, ‘hierarchical’ => true, ‘public’ => true, ‘show_ui’ => true, ‘show_admin_column’ … Read more
[jsmol acc=”caffeine” type=”mol”] Will look for an uploaded file named caffeine.mol. If it can’t find a matching post for an uploaded attachment and type=pdb, it will try http://rcsb.org/pdb. If it can’t find a match there either, you’ll get an error message in the JSmol window.
The get_attached_file() function returns the path to a file based on the attachment ID: $FeaturedImage = get_attached_file( get_post_thumbnail_id() ); Getting the path to a specific size is more complicated. WordPress stores the filename for resized versions of the images in as attachment metadata, that can be retrieved with wp_get_attachment_metadata(). Once you have the filename of … Read more