Tagged: x
-
AuthorPosts
-
May 26, 2016 at 10:05 am #1011206
scotshurdlerParticipantHi Folks,
I’ve attached a picture showing a password protected page and i wonder if above where says password protected etc, is it possible to insert an image banner we’ve made?
May 26, 2016 at 10:05 am #1011209
scotshurdlerParticipantThis reply has been marked as private.May 26, 2016 at 11:27 am #1011340
scotshurdlerParticipantThis reply has been marked as private.May 26, 2016 at 11:50 am #1011390
Nabeel AModeratorHi there,
Thanks for writing in! Please add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:
.post-password-form p:first-child { background-image: url('//testsitetestground.com/wp-content/uploads/2016/02/summerside-logo-length.png'); padding: 100px; }And then add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){ $('.post-password-form p:first-child').html(''); });Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
May 27, 2016 at 2:49 am #1012580
scotshurdlerParticipantThanks guys, i uploaded the actual graphic to media folder and when i use the url for that in place of the url you’ve used there, the picture actually disappears all together but there looks to be a space as if something is there.
Many Thanks
Neale
May 27, 2016 at 3:17 am #1012602
LelyModeratorHello Neale,
Please update your custom CSS to this:
.post-password-form p:first-child { background-image: url('http://testsitetestground.com/wp-content/uploads/2016/05/Summerside-Gallery.jpg'); padding: 170px; background-position-x: center; background-position-y: 64%; }Feel free to adjust the values accordingly.
Hope this helps.
May 27, 2016 at 4:08 am #1012668
scotshurdlerParticipantAhh brilliant, thanks guys! Last question relating to that i promise, playing around with the values I see that i can position it differently, in terms of scaling the image down is there a value i can use for that?
May 27, 2016 at 4:13 am #1012672
scotshurdlerParticipantScratch that, did a little digging and found the background size command which allows me to expand and contract the image.
Thanks for all your help!
Neale
May 27, 2016 at 5:03 am #1012708
RahulModeratorYou are welcome!
July 2, 2016 at 12:12 pm #1069703
scotshurdlerParticipantI’ve just noticed on mobile view, this image repeats around 3 times on my screen, how would we make that only show once like on the desktop/laptop?
Many Thanks
N
July 2, 2016 at 12:51 pm #1069724
ThaiModeratorHi There,
Please add the following CSS:
@media (max-width: 480px){ .post-password-form p:first-child { background-repeat: no-repeat; background-position-y: 50%; } }Hope it helps 🙂
July 4, 2016 at 7:33 am #1071420
scotshurdlerParticipantSeems to do the trick!
Many Thanks,
N
July 4, 2016 at 7:53 am #1071447
ChristianModeratorYou’re welcome. Glad we could help. 🙂
July 4, 2016 at 9:32 am #1071586
scotshurdlerParticipantApologies, one more question came up on this, I’ve added a second password protected page, which automatically displays the image from the first one. Is there a way to allocate an image specifically to that second page titled “newsletter”?
Kind Regards,
N
July 4, 2016 at 10:49 am #1071676
ChristianModeratorPlease get your newsletter’s page ID class (see https://community.theme.co/kb/how-to-locate-post-ids/) then duplicate the previously given code and append the class like so
.page-id-1755 .post-password-form p:first-child { background-image: url('URL of image'); }Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1011206 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
