Home › Forums › Support › Why does the edit page NOT look like the view page when I check my design?
- This topic has 66 replies, 4 voices, and was last updated 6 years, 7 months ago by Leo.
-
AuthorPosts
-
July 2, 2017 at 5:49 pm #343110yeswolf
I’m still not doing it right. Any way you can look at this for me like you did on one of my previous issues?
I want the video to be the same width as the top banner but when I try your suggestion above, all it does is type that string beneath the video. It does NOT change the size of the video. When I click on the video, it shows a blue box around the video that is the right width but the right hand third of it is empty white space. How do I determine the width and height I need? How do I get the string you sent me in place so it changes the size of the video, removes the white space in the video box on the right and increases the height in proportion to the width?
You also did not answer my other question — how do I get the video to reset to the “video poster” after the video plays? Very frustrated and need help please.
July 2, 2017 at 6:01 pm #343113yeswolfOK — Ignore the note above. I got the video size right but now the video won’t play. What am I doing wrong?
Also, how do I get the video to reset to the “video poster” after it plays (once you help me get it to play again)?
Any chance you can look at this for me like you did on one of my previous problems? I have tried to do it over and over and over.
July 2, 2017 at 6:05 pm #343115yeswolfIGNORE TWO POSTS ABOVE
OK — Holy shit! I got it the right and got it to work. Now, can you please tell me how I can get the video to reset to the “video poster” after it plays? OR How to get the video to reset to the beginning after it plays, including the “video poster”? Thank you!!!
July 2, 2017 at 6:15 pm #343118yeswolfOpps… “got it the right SIZE”
July 2, 2017 at 9:27 pm #343176TomLead DeveloperLead DeveloperUnfortunately I don’t really have a deep understanding of how the WP video shortcode works. Someone might have a better idea than me if you post on: https://wordpress.stackexchange.com/
July 2, 2017 at 10:33 pm #343202yeswolfOK, thanks. I posted. Hope to get an answer that explains it. All I need to do is get it to reset after it plays to the Video Poster it loads up when the page first appears.
July 9, 2017 at 12:16 pm #346549yeswolfSo I got this answer on the forum you sent a link to but I do not understand how to use it. Can you help me figure this out please?
——————————————————
0
down vote
accept
There’s no straight forward way of doing this but we can achieve this with a small JS snippet. You can add the following JS snippet in your footer to make it work with all videos in your content.var videos = document.getElementsByTagName(‘video’);
for (var i = 0; i < videos.length; i++) {
videos[i].addEventListener(‘ended’, function(e) {
e.target.load();
});
}
What does this code do?The above snippet register ended event on all videos it can find and just loads the video when it ends.
To make it more seamless, we can filter the_content if any [video][/video] shortcode is used, if so, then include this code, otherwise not.
Add the following code to your functions.php or in a custom plugin:
function ja_video_shortcode_check( $content ) {
if ( has_shortcode( $content, ‘video’ ) ) {
add_action( ‘wp_footer’, function(){
echo “<script>
var videos = document.getElementsByTagName(‘video’);
for (var i = 0; i < videos.length; i++) {
videos[i].addEventListener(‘ended’, function(e) {
e.target.load();
});
}
</script>”;
} );
}return $content;
}
add_filter( ‘the_content’, ‘ja_video_shortcode_check’ );
Tested in fresh WP instance using TwentySeventeen theme with no plugins activated.To add this code in a widget, add a Text widget, toggle to the Text view and paste the following code:
<script>
var videos = document.getElementsByTagName(‘video’);
for (var i = 0; i < videos.length; i++) {
videos[i].addEventListener(‘ended’, function(e) {
e.target.load();
});
}
</script>July 10, 2017 at 12:22 am #346808TomLead DeveloperLead DeveloperYou should just be able to implement that second code snippet using one of the methods here: https://docs.generatepress.com/article/adding-php/
July 13, 2017 at 11:40 pm #349206yeswolfHi, Tom. I think I only have two or three more things to figure out in order to finish my website. Let’s do it one at a time.
1) How do I use Lightweight Grid Columns to turn one column (page size) into two columns?
2) Not sure you can help me with this — I am using the “Fast Secure Contact Form” — have it all set up except for the email addresses and I am confused because it says something about Go Daddy (where I got my domains) requires email addresses connected to the domain? What does that mean? How do I get the “Fast Secure Contact Form” to work?
3) You told me this already, but please tell me again — how can I backup my entire website so it either cannot be hacked or can easily be reset?
Thanks. Three questions. Three steps to go.
July 14, 2017 at 12:39 am #349234TomLead DeveloperLead DeveloperHi there,
1. I’m not too sure what you mean? LGC splits your content (within the container) into columns.
2. I’m afraid I’ve never used it – you’ll need to ask the developers.
3. There’s lots of plugins for this if you do a quick search. Some free and some premium. This is a very popular one: https://en-ca.wordpress.org/plugins/updraftplus/
July 14, 2017 at 2:56 pm #349572yeswolfRegarding Lightweight Grid Columns, I have looked at it and am just not sure how to apply it/use it. Can you tell me how to use it please?
July 14, 2017 at 5:58 pm #349612LeoStaffCustomer SupportCheck out “What if I don’t want to use the TinyMCE button?” for example: https://en-ca.wordpress.org/plugins/lightweight-grid-columns/#faq
July 14, 2017 at 6:03 pm #349613yeswolfTom, I have tried the Lightweight Grid Columns. Clicked on the column button on my toolbar, sat it to 33% so I would get three columns, clicked UPDATE, but it made no changes — I still have only one big wide column. I tried this several times — both with “last column” checked and not checked, all the same. What am I doing wrong? If you want to glance at yeswolfcopywriters.com HOME page and see what I am working with, please do. I want three columns for the copy under the video ONLY. I want the video to stay as it is.
July 14, 2017 at 7:30 pm #349631LeoStaffCustomer SupportDoesn’t look like LGC is used under the video section?
If you want three columns then you need to have three opening and closing of the shortcode. Like this:
https://gist.github.com/leohsiang/dc66505011bdac3a994e414153358ad4July 14, 2017 at 8:00 pm #349643yeswolfThank you Leo. I had removed the code because it didn’t do anything. So I just tried copying and pasting what you send me and all it did was post the phrase “some contect” across the top of the page three times.
Sorry to be so dumb but I know nothing about posting/writing code. How do I paste what you sent in? Do I put it all at the top (under the photo code)? Does the [/lgc_column] come after the content? Do I have to break it into three columns manually? I thought it was supposed to be automatic?
In order to understand it, I need you to tell me specifically/exactly WHERE I put the code (visual or text page and where on the page) — and HOW I put the copy on the page in (i.e., again WHERE and HOW). I have tried this over and over and it never works.
-
AuthorPosts
- The topic ‘Why does the edit page NOT look like the view page when I check my design?’ is closed to new replies.