I'm attempting to place some embed code into a Premium WordPress Theme.
NOTE: I'm not great when it comes to php.
The embed code is produced by a video player called EasyVideoPlayer. (Basically it allows me to use Amazon S3 and gives me feedback on when people stop watching the video.)
This is the embed code I have:
<div id="evp-3f0d657d2345b5ea751153sc3a4b2c0e-wrap" class="evp-video-wrap"></div><script type="text/javascript" src="http://www.mysite.co.uk/evp/framework.php?div_id=evp-3f0d657d4255b2ea9817650c3a3b2c0e&id=ZXh0cmEtbW9uZXktZnJvbS1ob21lLTEubW92&v=1275160528"></script><script type="text/javascript">_evpInit('ZXh0cmEtbW9uZXktZnJvbS1ob21lLTEubW92');</script>
I've opened the index.php wordpress file and placed this video embed code in between the that represents the area of the website I want it to show up. However the video is not showing.
If we place both the theme and video player aside, would you expect the php code to accept what I've done or is this not the way to go about adding this embed code?
NOTE:I've contacted both the Wordpress Premium Theme support at Woothemes.com and the video players support for EasyVideoPlayer.com However both tend to stop at the point that another paid product is involved! Grrreat.
website is www.extramoneyfromhome.co.uk
I've created a WordPress plugin for EasyVideoPlayer, which solves this issue. It's also a heck of a lot nicer working with the visual editor instead of hard-coding the video into the template.
Try adding the code all in one block - at present the Script is in the header, rather than below the DIV tag.
This is just an idea to rule out a simple problem.
Regards,
Matt
Related
Say I have api.wordpresssite.com where I will be entering data, uploading images and so on. Then saw that I want to consume the WordPress API on another site like mysite.com.
WordPress will then assume that every link in content will be api.wordpresssite.com It will also embed images with the same URL because the links and media are absolute.
Am I supposed to process the content on mysite.com looking for links but ignoring media or is there a plugin or function that I can add to my theme to do this?
I have tried changing the base URL and while it works for links, it breaks media uploads.
There are multiple endpoints so I am thinking that even if there was a function to add, it would be too far down the line of execution to do anything.
For Example, there is the WP API, as well as JetPack, and Yoast that I am using.
There are tonnes of articles on "How to use WordPress in Laravel" but not a single article has talked about how to "normalize" the content for the site that is consuming it.
The API feels like it's only true out of the box use is to be used with some kind Javascript based front end.
What I would like is a headless WordPress API with relative URLs for content links.
I was looking for the same answer and solved it this way:
What you would need to do is set the site URL to www.remote-domain.com.
You can do this by going to WP Admin > Settings > General
Screenshot
Then on your functions.php file or somewhere you can add a filter (plugin etc.) add this filter in.
add_filter( 'rest_url', 'fix_rest_url');
function fix_rest_url( $url ) {
return $url;
}
Got the answer from: https://core.trac.wordpress.org/ticket/49146
My suspicion that no one really uses the WordPress API seems to be confirmed. Mainly on an external site.
I had to create some render methods that looked for HREF links and remap them on the content, and menus.
It still seems silly and not very polished.
I'm totally new in website development and as my first experiment I'm working with website to replace my company's old site (if success).
Have done pritty much allready but I really want to have this popup image gallery to work with Magnific popup for the responsiveness.
I have setup a local server with QuickPhp for development as I don't have server for my website yet.
Eventhough my site is working when tested in CodePen but not on my Quickphp server.
I made sort of gallery site that contains images that is supposed to open to popup for larger view and to zoom closer if wanted. The popup itself will work but some of code doesn't work. In example:
-not showin close button.
-not closing popup when clicking background.
-no animation when popup opens.
this all works with the same code tested on the CodePen-site though.
Magnific popup JS and the CSS codes I copied from the Build tool(to the folder within the sites .php)
They are included to .php page with script. CSS in the head and the JS in the footer. JQuery is from google https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
For now I would need answears to theese Questions:
1. Is it possible that the problem is within the QuickPhp-server setup of mine? If It doesn't fully support jquery in local setup?
2. What else could be wrong?
If needed I can put the codes here later.
The problem was in the code allthough. I implemented the codes from the Maqnific website again and red the documentation over 5 times. I also noticed that the included stylesheet files needed to be linked from the website's root folder exactly as shown on the Macnific guide.
If anyone is having similar problem I suggest to keep on reading and searching. Taking a brake for day or two makes a differens in perspective too. Some time apart of the project helps to notice things that you might not have seen before. Especially checking the code for incorrections is a bitch.
Just yesterday I found a typo in my media query meta tag that was making my site not to change styling when viewport size changes. The typo was from 2 weeks ago. max-device-width was written as max-divice-width.
Normal when i try to customise WP style i would use inspector view in Chrome and this would allow me to locate style code easily.
i was wondering how i can do the same for HTML or PHP code in WP such as plugins and the CMS it self?
Thank you
PHP is server side code and can't be found in the browser. If you want to see the code for WP plugins then you'll need to either download the plugin to your local machine or view the files on the server hosting WP.
Iassume you run it on your own root-/ webserver,...
so if you want to add HTML Elements to a post or site just do it in the text few like you would in an HTML-Editor like for some link thing for instance (you should allready know that..'pretty shure it also works for js).
However if you want to customize the way every page on your blog looks, you can also do this manually, but it won't be as easy.
There should be a section under the theme customization part where you could upload your own css and php (at least with a lot of styles it's like that).
I WOULD NOT mess with the files on your server, if you don't know what you are doin, cause - to be honest - you can make a great blog/ website by using the tools it gives to you. ;)
I recommend using the stylesheet from your wordpress theme for a custom HTML-document based on the source of a blog page, if you go for the looks... and in every other case just use plugins! :P
I am a asp.net developer , but new to wordpress . I want opinion or expert advice in regard to playing a flash file before loading of home/Index page of wordpress site , for example in loading www.formula1.com a flash file with sound is played , how can I get this feature done.Thanks
I think this is not a WordPress specific question. Do it first on an plain html build and once you have it working there, get it working in the same way on the WordPress build.
In WordPress your theme controls the front end of your site, so it would live in your theme folder.
If you're new to WordPress the best advice I can give you is, get it working in the most basic form possible first, and once you have that, look at finding the correct WordPress methods.
If you're not sure about how to make a flash file play as an intro to a website, while or before the website loads, ask that question outside of the WordPress context to get the answers you;re looking for.
I am working on this new site and am having difficulties implementing this one functionality. The link is:
www.bigideaadv.com/adaptive2
I am using the Supersized.js plugin to make the image fit the size of the browser no matter the size or shape. I have also implemented a Wordpress blog as well under news+events. What I'd like to do is have the blog slide up from the bottom when you click on the link and back down when you click on another page. Exactly how the blog link works here:
www.ultranoir.com
I originally had all of the content shoved in the header.php file in Wordpress and was doing show hides. Needless to say, I was unsuccessful. Wondering if anyone had an thoughts.
Thanks in advance.
You may want to look into Wordpress Theming. It's pretty straight forward and there is a lot of great documentation found here:
http://codex.wordpress.org/Theme_Development
You wouldn't want to put all the code into the header.php file because that's not how wordpress works. You'll want to edit other files such as single.php and index.php.
Though for the "slide up / down" you should be able to use some simple jQuery for this:
$('#yourSlideMenuButton').slideToggle("slow", function(){
//do something when finished.
});
Please be careful not to plagiarize the other design!