Slider stops loading pictures on a different page - wordpress

I am building this site - http://www.bellated.us.lt/.
The problem is that the slider stops loading pictures for all other pages except for the main one. To see the problem you just have to press on any link from the menu. It is a wordpress system and all the code is added to the header.php. In fact, this file should be loaded properly always, not only for the main one.
Actually, I have no idea on how to solve this, so if you have any suggestions - please share.
Thanks.

You have a lot of network errors, like the following, on your page.
"NetworkError: 404 Not Found - http://bellated.us.lt/js/lightbox.js"
"NetworkError: 404 Not Found - http://bellated.us.lt/sample-page/slider1.jpg"
So probably your issue is caused by a path error, where you are referencing your files with incorrect relative paths. If so, these might help:
<?php get_stylesheet_uri() ?>
<?php get_template_directory_uri(); ?>
See:
get_stylesheet_uri
get template directory uri

Related

JavaScript issue on WordPress website

may I know why all JS not loading in this WordPress site? How to solve this issue?
https://www.znameseveky.cz/
There could be a syntax error in either functions.php or footer.php, as the page gets cut off after </main>.

My Fonts get changed after refreshing about page in wordpress

When I go to this page from home page. It shows proper font. But when I refresh this page its font gets changed.
Please see the screenshots:
check your browser console there is font error means fonts not found
GET http://www.stitchstudio.co/about/fonts/DINNextLTProBold.woff2
GET http://www.stitchstudio.co/about/fonts/DINNextLTProRegular.woff
GET http://www.stitchstudio.co/about/fonts/DINNextLTProBold.woff
GET http://www.stitchstudio.co/about/fonts/DINNextLTProRegular.ttf
GET http://www.stitchstudio.co/about/fonts/DINNextLTProBold.ttf
GET http://www.stitchstudio.co/wp-content/themes/lens/theme-content/css/fonts/DINNextLTProRegular.woff2
GET http://www.stitchstudio.co/wp-content/themes/lens/theme-content/css/fonts/DINNextLTProRegular.woff
GET http://www.stitchstudio.co/wp-content/themes/lens/theme-content/css/fonts/DINNextLTProRegular.ttf 404 (Not Found)
check path and fix it then it works perfectly
I guess you are not pointing to the theme directory in the right way, you should use get_stylesheet_directory_uri() or similar.
<?php echo get_stylesheet_directory_uri(); ?>/font-folder/font.extension
right now, it's not using it, so from homepage, font gets loaded because it points to:
http://www.stitchstudio.co/fonts/DINNextLTProRegular.woff2
for other pages it is not, and it will use page url, not site url, just like:
http://www.stitchstudio.co/about/fonts/DINNextLTProRegular.woff2
causing the error.

Only the left menu toolbar is showing up on Wordpress admin

When I log in to my Wordpress admin, only the left menu toolbar is showing. Nothing else is displaying. The website front end works fine.
What I've done so far to investigate:
Renamed plugins folder to pluginz to make sure none of the plugins are doing this
Made sure there is no javascript error on the page
Made sure there is no 404 errors
Temporarily removed .htaccess to eliminate possible htaccess issues
Made sure there is no fatal php error thrown on admin
Any idea what might be going on?
I was able to fix the issue with help from here :
To fix the bug:
Open file blog/wp-admin/includes/screen.php in your favorite text editor.
On line 706 find the following PHP statement: <?php echo self::$this->_help_sidebar; ?>
Replace it with the statement: <?php echo $this->_help_sidebar; ?>
Save your changes.

Integrating a Wordpress query into a PHPBB theme template

UPDATE: Managed to solve this by accident, answer is below.
I'm working on a site which requires several of the 'promoted' posts from the Wordpress blog to be displayed at the top of the forum.
(This is literally the only interaction between WP and PHPBB, there's no single sign-on or anything.)
I'm following the instructions listed here:
http://codex.wordpress.org/Integrating_Wordpress_with_Your_Website
and here:
https://wiki.phpbb.com/Tutorial.Template_syntax
As such, I've edited my theme's overall_header.html file to include this at the top:
<!-- PHP -->
define('WP_USE_THEMES', false);
<!-- ENDPHP -->
<!-- INCLUDEPHP ../wp-blog-header.php -->
Later, at the correct place in overall_header.html, I need to call the actual php file which contains the query, which I do so like so:
<!-- INCLUDEPHP ../wp-content/themes/mytheme/heroarea-secondary.php -->
But when I load the forum, I get a fatal error which causes the page to stop loading, with the following error message:
Fatal error: Call to a member function main() on a non-object in C:\Apache24\htdocs\test\wp-includes\functions.php on line 808
Now I know there's not actually anything wrong with functions.php so I assume the issue is in my configuration, but I have no idea why it doesn't work.
If I create a seperate, standalone PHP file which just has this:
<?php
define('WP_USE_THEMES', false);
require('C:/Apache24/htdocs/test/wp-blog-header.php');
include('C:/Apache24/htdocs/test/wp-content/themes/mytheme/heroarea-secondary.php');
?>
Then that works perfectly without any troubles and pulls the correct three posts from the 'promoted' category as desired. But as soon as I try and replicate it in PHPBB, I get the fatal error listed above.
Can anyone point me in the right direction?
I've tried including wp-load.php and wp-config.php but neither make a difference.
I actually just now managed to solve the issue.
The solution is to add
define('WP_USE_THEMES', false);
require('path/to/wp-blog-header.php');
To the bottom of common.php in the phpBB root directory.
Hope this helps anybody else in the future!

Warning: Cannot modify header information when using require or require_once

I'm WordPress newbie.
I'm creating a plugin that redirect to custom login page each unregistered user access a website, let say the custom login page : custom_login.php.
I am able to create a code to redirect it but it seems no wordpress functions work in custom_login.php. So, I think I have to load something through the file. I guess wp-load.php.
Then I add some codes below at the top of the page :
<?php
require( 'd:\xampp\htdocs\wordpress\wp-load.php' );
?>
But then I got this error :
Warning: Cannot modify header information.....
I changed to require_once but still get similar error.
Some solutions of this forum threads advice to delete any whitespace. Frankly, I don't know what does it mean but I tried to delete all whitespace anyway so that the code become :
<?php require('d:\xampp\htdocs\wordpress\wp-load.php');?>
But it does not solve anything. The error is still exist.
Please help me, the expert ones.
Thanks in advance
Try inserting a system path relative to localhost, like this:
require( '/wp-load.php' ); // or just
require( 'wp-load.php' ); //
All depends on the location you are trying to include wp-load.php from.
On the other hand, you don't have to include wp-load.php if you place the file custom_login.php. in the stylesheet directory as a template or as a custom page. The way to do it is:
.1 Rename the file to page-custom-login.php
.2 Move the file to the stylesheet directory (The theme directory)
.3 Go to admin and create a new page with the title "custom login"
That's all. Now WP will treat that file as a single custom page.
They are correct - you have a space before the opening php tag in one of your files. It can be a bit tricky to find, but look hard.
If you can't find it, try looking for ob_clean() php function to help.

Resources