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.
Related
The title basically says it. I currently have my home page with the HTML sitting in the classic editor box. Should I move that to front-page.php? I know that it doesn't REALLY matter, and it won't have a huge impact, but I am being meticulous about creating a speedy website. So which is faster?
Also, I am currently using 2 separate PHP files for headers. One on the home page, and one for the rest. Should I just hard code the header for the home page into the same place as the home page HTML since it's the only page that uses it?
I'm pretty new to PHP, but I've searched Google extensively and can't seem to find my answer. Using WordPress. Really appreciate your help!
For speeding up the website, no need to change the home page or the header file. please do the following things for speeding up the website
Optimise your images
Enable caching
Enable GZIP compression
Minify CSS, HTML & JS files
Update plugins
Clean-up your database
Moving the html code to a template file will improve the site speed because WordPress will not have to retrieve those html tags from the database. And it is conventional and actually a good practice to place all rendering code (html, css, js) to the template or theme files where they should be, instead of directly adding them in the backend or instead of including them directly in the post editor.
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.
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'm a beginner in PHP but an expert in programming in general, so I program C and C++ usually, but I have no experience with posting and getting with PHP, so I don't really understand the exact mechanism how this works.
Yesterday I worked for like two hours on my webserver and set a page on my Wordpress to make visitors upload a file. The page submits a form to a custom PHP page, but that page is empty and dull, and I would like to make the confirmation page in Wordpress itself. What I tried to do for that is that I created a new page, and used the plugin "insert PHP", and simply pasted the code from the page, to which the form submits, and made my upload form post to that Wordpress page. This doesn't seem to work.
How can I get this to work?
Simplifying the question: How can I make my form in wordpress post to another wordpress page and give the response in a wordpress page rather than a PHP page created from scratch?
If my question is not clear or requires any additional information to be answered, please let me know.
Thank you.
You're going to want to get to know specialized page templates in WordPress, and the page templating system in general. Ideally, you'd create a page in wp-admin and create a specialized page template for it.
If you're doing form processing, you can do that in the new template...but may be better off moving that logic to the functions.php file. Use action hooks to ensure that your processing functions are run on submit.
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