Forum Replies Created
-
AuthorPosts
-
EduardoMember
Wow, that did it. Thanks Victor.
EduardoMemberI've added the code to the bottom of my functions.php file, but I'm still running into the same problem when I use the "more tag." The excerpt displays with the ellipsis, and it also displays on the post page.
EduardoMemberDo I use this code with the More Tag? The more tag is still not working.
EduardoMemberThank you, Christoph.
You learn something new everyday. I should've known about optimizing my images and thank you for introducing me to tools.pingdom.com.
EduardoMemberI just want to add a tiny bit of margin to the top to have the male's face in the picture not be hidden by the navigation bar.
January 14, 2016 at 5:03 pm in reply to: Backstretch Image is scrolling instead of remaining fixed #176527EduardoMemberI was able to resolve the issue. The Agency Pro theme supports a background image and a backstretch image. I deleted the background image and only went with the backstretch image. Fixed.
EduardoMemberThank you, Marcy. This worked great!
EduardoMember@Marcy, I'm currently doing my work in local environment. How do I clear the server cache in this situation?
EduardoMember@braddalton, I did indeed delete the code from the functions.php file. Is this a problem?
January 12, 2016 at 6:28 pm in reply to: Backstretch Image is scrolling instead of remaining fixed #176332EduardoMemberThank you for the reply Karla. Unfortunately, it didn't seem to change anything on mobile.
EduardoMemberThanks Braddalton. I cut and pasted the code into front-page.php, but unfortunately, it's still loading on my other pages. Hmm.
EduardoMemberThanks for responding Marcy. My code has something a tiny bit different.
Here's the original code://* Enqueue Backstretch script and prepare images for loading add_action( 'wp_enqueue_scripts', 'agency_enqueue_backstretch_scripts' ); function agency_enqueue_backstretch_scripts() { $image = get_option( 'agency-backstretch-image', sprintf( '%s/images/bg.jpg', get_stylesheet_directory_uri() ) ); //* Load scripts only if custom backstretch image is being used if ( ! empty( $image ) ) { wp_enqueue_script( 'agency-pro-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' ); wp_enqueue_script( 'agency-pro-backstretch-set', get_bloginfo( 'stylesheet_directory' ).'/js/backstretch-set.js' , array( 'jquery', 'agency-pro-backstretch' ), '1.0.0' ); wp_localize_script( 'agency-pro-backstretch-set', 'BackStretchImg', array( 'src' => str_replace( 'http:', '', $image ) ) ); } }
Here's what I added trying to try and follow your directions:
//* Enqueue Backstretch script and prepare images for loading add_action( 'wp_enqueue_scripts', 'agency_enqueue_backstretch_scripts' ); function agency_enqueue_backstretch_scripts() { $image = get_option( 'agency-backstretch-image', sprintf( '%s/images/bg.jpg', get_stylesheet_directory_uri() ) ); if ( is_front_page() ) { //* Load scripts only if custom backstretch image is being used if ( ! empty( $image ) ) { wp_enqueue_script( 'agency-pro-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' ); wp_enqueue_script( 'agency-pro-backstretch-set', get_bloginfo( 'stylesheet_directory' ).'/js/backstretch-set.js' , array( 'jquery', 'agency-pro-backstretch' ), '1.0.0' ); wp_localize_script( 'agency-pro-backstretch-set', 'BackStretchImg', array( 'src' => str_replace( 'http:', '', $image ) ) ); } } }
Unfortunately, the background image is still loading on other pages.
EduardoMemberI used the Header scripts box. Thanks Braddalton.
EduardoMemberWorked perfectly! Thank you!
EduardoMemberThanks for the tip Tom. You code worked well.
EduardoMemberWorked great Jamie! Thanks.
EduardoMemberThank you, Susan. I'll look into it.
EduardoMemberBraddalton, thank you for your response. I went ahead and created a new subdomain. I discovered that by using a subfolder on the same domain I could access different pages on the staging site. Instead, I was getting 404 errors on the live site due to page URLs referring to the live site's domain.
"site.org/files/page-1" returned 404 error.
"staging.site.org/page-1" returned the correct page.
EduardoMemberThis worked perfectly. Thank you, Victor Font.
EduardoMemberThis reply has been marked as private. -
AuthorPosts