I'm building a Wordpress blog for someone with an ASP.NET website, their hosting provider won't install PHP on their server so we're having to use an external Linux server.
My question is, is there a good way to include their ASP.NET header and footer into the Wordpress blog despite it being hosted externally on Linux server.
Thanks.
Assuming the header and footer are ASP controls of some form, and assuming those controls are likely to includes things like links and images with relative urls, the easiest solution would be to create a simple ASP page with the header and footer controls, and in the middle an iframe pointing to the server hosting the blog.
The other option would be to create two "hidden" ASP pages that contain the header and footer controls. Then your wordpress code could use something like file_get_contents to get the contents of those pages, and the PHP DOM API to parse out the parts you need and rewrite any relative urls.
Related
I have two sites, on two different platforms. One is on Wordpress, it lives at blog.example.com. The other is on Shopify, it lives at shop.example.com.
They both have the same header.
What is the best way to have the header code live in one place and have the header included on both sites? The only way I can think of off the top of my head is an iframe, which doesn't seem like the right idea.
Anyone have a way to do this?
The best approach will be to manage the header from one platform Shopify or Wordpress and get it from the other via AJAX ( if you allow CORS on the WordPress side) or using a crawler.
Since WordPress is more robust when it comes with custom back-end logic I recommend managing the Header from Shopify and crawling it from WordPress in order to use it. (have in mind that the links must be absolute, not relative)
If you plan to manage it from WordPress and if the CORS is not enabled, you will need to create custom App that will have to craw the WordPress site and get the header. From there depends how you like to store the header:
create a snippet via the Assets API and update it manually with a sync button or cron job
create a proxy app page that you will request and will return the header markup
TLDR; the easiest solution will be to make an AJAX request from the Shopify site to the Wordpress site and get the HTML, if you enable CORS on your wordpress hosting.
I have recently moved my WordPress website from HTTP to HTTPS.
But when i load my webpage with HTTPS the stylesheets doesn't load due to mixed contents . what are the changes i need to do to get it work.
I am using AWS Certificate manager with ELB .
I followed this tutorial and now my admin panel is not loading as well with an error of ERR_TOO_MANY_REDIRECTS
Please Assist
Make sure all of your CSS links are called with HTTPS. Check your console, it will tell you which url are problematic.
Make sure all of the links in your .css files are in HTTPS too, or relative path (background-image urls, fonts urls etc.)
Try to use this Wordpress plugin, it will fix all of yours links.
I have been recently working on a new site for a small business named Stick'em Stickers.
Right now the site is set up so that the front end that the uses see is a static webpage. In the background I have a WordPress instance running that we use to load dynamic content onto our site.
For a better understanding, you can just visit the website here.
My problem is that any pages or content that is trying to load that are WordPress related, will not load correctly or all the way.
Can I include an external PHP footer document in an ASP.NET Web Forms Site Master?
The idea is, we have a CMS site and an Application Site, both on the same domain. The CMS Admin will update the footer quit often (which is called footer.php), WordPress CMS, and all I want to do is link in my Site Master section to that footer.php file? Don't know if that will be possible at all?
Thanks
If you add the response text to from the php page to the asp page it should work, just make sure that the PHP file is parsed first (eg. running on a server).
I am developing a SaaS based application in PHP , in which my clients (web site owners ) can create and customize some contact forms. Then I would like to publish that page to my client web site with out showing the url ( I mean it needs to seem like the page from my clients domain ). We can see the same situations in surey monkey and other online chat applications . Please help me to solve this .
Thanks in advance,
Sunil
4 Solutions:
iframe - Downside is, many people don't like them. Some people have security issues with it. Other than that, they are just fine.
External Javascript file - Include it in your header, have it populate the page with specific content. Works like a charm and you can even use remote files: <script src="http://external.com/form.php" type="text/javascript"></script>. Downside, possible conflicts in the page if user wants to include own content on the page. Personally I prefer this method and use it in syncing a website menu across multiple servers (some apache, some tomcat).
JSONP - Much like the external Javascript file, load up the external page via a JSONP request. Downside, a lot of configuration, more than just including the one line above.
curl - Great tool, no way for anyone to realize the content is from another side. Requires backend configuration and more than just plain HTML. More coding. More professional.