Image Max Width On Pages 2

Hi,

I asked for some help in this thread;

I have just got round to implementing this on my website and when I try to put the function into my child theme it says;

Scrape nonce check failed. Please try again.

I assume this means that the function i was provided is wrong in some way? Please advise

Thanks in advance

Kev and Jade

Hi Kev and Jade,

The issue that you are experiencing should not be related to the code that is suggested. I checked the case and added the code to my installation and it worked with no problem and there was no error such as the one you explained.

Having said that, it might be a plugin conflict of some kind:

Kindly test for a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

If you still experience the problem, I’d appreciate that you get back to us with the URL/User/Pass of your website using the Secure Note to follow up.

Thank you.

Hey,

I deactivated all plugins and it came up with the same error.

It therefore is something beyond my knowledge to fix. i have provided our credentials and would appreciate some advice.

Cheers

Kev and Jade

Hey Kev and Jade,

I’m sorry but we couldn’t fix this too as this is not also a theme issue. This has something to do with your Web Host and/or WordPress setup. Please contact your web host or a third-party developer to fix this on your site.

Alternatively, do not edit using the Theme Editor moreover that it’s a security risk. Download your functions.php to your computer instead and edit it with a notepad. If this is troublesome, you can hire a web developer to do this for you.

-----------------------------------------------------------------------------------

I’d also just like to add here that you do not need custom code to achieve what you need in your previous thread. Our themes do have several Page Templates (read more here) to choose from and for your case, since you are using a Fullwidth Site Layout, you simply need to choose a Blank No Container page template and disable the Row’s Global Container option and your row will span the whole width of the screen.

Also, if you don’t know yet, you can also “templatize” your page using the Template Manager.

-----------------------------------------------------------------------------------

Lastly, I’d like to add that if we do provide custom code here in our forum, it’s only to provide guidance. We do not provide fixes or enhancements custom code and as part of our theme support. The support staff who answered the other thread is new so he doesn’t know this yet. We’re sorry about that.

If something could not be achieved in our theme, you can let us know and we’ll take a note of it or queue it up as feature request and our development team will look into the requests in a timely manner and decide if it’s going to benefit most users.

Hope that helps.

Hi,

Thanks for yur detailed reply, however your fix does not work. I have checked no global container and have no template in pages for the home page and it is stuck at 1200px wide.

This is because I have set my CSS to this;

.x-main.full {
max-width: 1200px;
width: 100%;
margin: auto;
}

The reason I have done this is because I want the max width of my posts on my website to be 1200px. The downside of this is that it is obviously restricting the max width across the entire website.

How can I have my posts max width set to 1200px and still be able to have full width images on the home page.

Please advise

Kev and Jade

Hi Kev and Jade,

Let me clear these things up, first, let’s forgot about the custom function code given on the other thread since you did not successfully implement it and its not the cause of the Scrape nonce check failed error.

What you’re trying to do should have been easy to achieve in X and Cornerstone, but it becomes a bit complicated because of your custom CSS, specifically that one you show above to limit the max-width and container on the entire site, you could have been set that under Theme Options > Layout and Design > Site Max Width.

Now you would say, that this will limit the pages (and banner images) max-width as well. No, it will not if you use a Blank - No Container | Header, Footer page template, and turn off the Row’s Global Container option.

Take a look of this example page, this is a copy of your about us page but using a Blank - No Container | Header, Footer page template, as you can see I was able to have a fullwidth banner and a contained text without applying a custom CSS on it.

So how did I do this? I simply turn off the Row’s Global Container on those banners and remove the section margins on it.

Now your next question might be, why are the second and third images are not fullwidth.



That is because those images are not big enough, to begin with, it only has 1150px of width, if you’re expecting your site to be viewed on large screens, you should have uploaded high-quality images, try 1600px by 900px images next time.

Can we force these small images to go fullwidth? Yes, we can with a custom CSS, but please keep in mind that this will stretch the image and it may look a bit blurry.

Add this to the Image Element CSS area to force it to go fullwidth, only use this if don’t want to re-upload your images.

$el.x-image,
$el.x-image img {
width:100% !important;
}

Please keep in mind that sometimes customization is like a double edge sword, it helps you with something but breaks some things.

Hope this shed some lights,
Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.