I am trying to insert widgets on additional pages, I have found a plugin which allows me to do so. However, when i use the parallax feature the “Background Full” and “Background Small” images do not display?
This appears to be a recurring issue on these forums. Any help would be highly appreciated. You can see some examples i have set up here: http://www.tjdonegan.com/seo/, I have set up examples for Left, Right, Background Small, and Background Full - as you will be able to see the last 2 do not display correctly.
Commented out:
// Add slider JS only if is front page ans slider is enabled
//if( ( is_home() || is_front_page() ) ) {
and the following if statement:
if ( is_page_template( ‘template-home.php’ ){
wp_enqueue_script( ‘shapely-parallax’, get_template_directory_uri() . ‘/js/parallax.min.js’, array(‘jquery’), ‘20160115’, true );
Thanks for you reply nirvana002. If im honest my knowledge on php is rather limited. Would it be possible for you to give some further instructions?
When I am commenting out can this be done anywhere within the functions.php file?
Am i commenting out the following code? if ( is_page_template( ‘template-home.php’ ){
wp_enqueue_script( ‘shapely-parallax’, get_template_directory_uri() . ‘/js/parallax.min.js’, array(‘jquery’), ‘20160115’, true );
Do i simply put // in front of it?
In my header.php file i do not have the full code you listed above, i can find the following: <div id=“main” class="<?php echo ( !is_page_template( ‘template-home.php’ )) ? ‘container’: ‘’; ?>" role=“main”>
Is this the correct line of code to remove?
With the Top Callout in the extras.php file, is this going to replace the existing Top Callout? If not, where in the file should the code be placed? can it be placed directly below the existing Top Callout and do i need to do anything to close it?
In the final piece of code you sent me for the extras.php file i notice: (!is_page_template(‘template-cmp.php’)) && (!is_page_template(‘template-portal.php’)) && (!is_page_template(‘template-reporting.php’)
Are “template-portal”, “template-reporting.php” new page templates you have created? I currently only use the 2 original templates which are homepage and default page.
Sorry, I assumed you have a basic knowledge of programming.
I hope I can make things clearer
// stands for comment. everything that comes after // is not used
also the /* syntax would be valid for commenting out multiple rows
functions.php
the two if statement I mentioned ensure that the parallax functionality is only enqued for the home/frontpage or the template-home. (the default frontpage i guess)
so if you comment out the first if statement and add also an if statement for your template-???.php file for the second script you are good to go here.
you could also comment out the second if completely, but then the script will be loaded for all pages you have.
header.php
yes, it’s the correct line.
remove, is the wrong wording (from me), i just added my pages (i.e. template-reporting.php) to ensure that I have the same behaviour as in the landing page.
just look how i did it.
inc/extras.php
yes, it’s a replacement or enhancement (what you like best) of the current call-out.
I added my pages here. I don’t know exactly if this is really needed, becaus I tried so many different things to get this s*** working.
last option:
if you still have problems and you’re not afraid of trusting an unknown forum user, you could give me ftp access to your webspace I could try to fix this.
but just try it on your own first, maybe now you get it to work.
I have tried again, but i don’t seem to be having much luck. Do i need to create a new page template from scratch? I tried using both page.php and template-home.php within an if statement after the commented out if statement for the homepage but neither of these seemed to work.
I went through all of your steps but no luck. If you would be happy to take a look then please let me know, if you private message me your email address and i can arrange FTP access for you. This is really frustrating
I am having the same issue with my website. The background-small and background-full images on the front-page (using parallax front section widget), used to work and then stopped working. The “left”, 'right", and “top”, “bottom”, images do work.
Hi Matthias,
Thank you for your quick response. I made the changes to the functions.php and headers.php file that you recommended, but don’t see any changes. I didn’t make the change to the inc/extras.php file because that code didn’t look like anything I had on my site (albeit I’m new to web-development, and am just a hack of a coder in general).
Would it help to see the .php? If it would be helpful to talk in a private thread, that works for me too. I really appreciate the help.
Thanks for taking a look. And yes, we only want this to show-up on the front-page, NOT the other pages. It’s so weird that this worked and then it didn’t. I did download a pop-up menu plugin and table plug-in yesterday afternoon that might have affected this (because I can’t think of anything else), but then I deactivated them AND deleted them.
I’ve provided both credentials below for WordPress Admin and the SFTP.
SFTP
I was using Filezilla, which requires the sftp:// part before the host name
host: sftp://kippgalaxy.sftp.wpengine.com
Port: 22222
UN: kippgalaxy-amandag
PW: Kipp510!
Thanks for taking a look. And yes, we only want this to show-up on the front-page, NOT the other pages. It’s so weird that this worked and then it didn’t. I did download a pop-up menu plugin and table plug-in yesterday afternoon that might have affected this (because I can’t think of anything else that would have), but then I deactivated them AND deleted them. I also just deleted Shapely Theme from my wordpress admin (and sftp) and then reinstalled (along with the Shapely Companion); this didn’t work either (but it did restore the php files back to their original state).
I’ve provided both credentials below for WordPress Admin and the SFTP.
SFTP
I was using Filezilla, which requires the sftp:// part before the host name
host: sftp://kippgalaxy.sftp.wpengine.com
Port: 22222
UN: kippgalaxy-amandag
PW: Kipp510!