I have a fully functional Wordpress custom theme. I have just installed Woocommerce and followed this guide. I have followed the very basic instructions to copy page.php, rename it and modify the loop. I have done this and am able to use Woocommerce, however in the page.php file, I have a
<?php get_header(); ?>
command, which successfully displays that part of the layout in my normal wordpress pages. However, in the direct clone which is now called woocommerce.php, it is not working fully, The links show up, but without any of the associated css which is linked into the header file. Any ideas why two versions of the same file would mean only one correctly imports / interprets the css?
Here are the two web pages:
http://www.gas-sense.co.uk/blog
http://www.gas-sense.co.uk/blog/product/gas-sense-personal/
OK, I have fixed this now. It was a dreamweaver issue, when cloning the file and renaming it, dreamweaver didn't seem to catch up with updating the links. I have since manually rewritten the references and it is working, thank for your help!
Related
I have been trying to figure this out for the past couple of hours, but how do I integrate the plugin into a wordpress site?
Because the plugin itself does not have a specific directory to be placed, I am confused as to where the files need to be put in order for it to work. My explanation is pretty vague, as I haven't been able to upload any of the 3 files mentioned into wordpress as of yet.
so there are 3 files:
jquery.magnific-popup.js/ jquery.magnific-popup.min.js/ magnific-popup.css
The end product i need is essentially just a set of gallery items, not restricted by width or height, so I am able to have a website similar to this one here as reference: http://www.three-d-conceptwerke.com/
Each Gallery item opens a pop up that displays several images within each gallery, in which case each item is treated as a project containing several images.
That aside, without knowing how to integrate the files into wordpress, I am unable to work on it. Any clues?
It doesn't matter where you place them - just call the scripts and stylesheets in your header or add them into your functions.php.
E.g. if I uploaded them into a directory called external-plugins, I would just call them as
<link href="http://www.example.com/external-plugins/magnific-popup.css"> <script src="jquery.magnific-popup.min.js"></script>
And add your arguments below. Should work fine in your header.php
Edit: That link you posted pretty much explains everything you need to do - if you can't follow it, maybe you should hire somebody else to do it for you!
The instructions are pretty clear from the link you provided...
Create the directory magnific-popup in your theme’s directory. Download the MP CSS and JS files from GitHub and put both in the magnific-popup directory
You need either use an FTP client like Filezilla or use a File Manager from your hosting control panel to log into your site's file directory. Once you are there, navigate to your WordPress theme's directory wp-content/themes/your-theme/ and create a new directory named magnific-popup. Then upload your 3 files into that directory and follow the rest of the instructions to finish setting up your popup.
If you've found this helpful please mark this as the acceptable answer to your question.
For a project I'm working on I am trying to accomplish to match the whmcs client area to my wordpress site.
So far I've made a lot of progress but I'm stuck right now. I want to include the header of my wordpress site in whmcs.
I tried to implement the static code of my header in the header.tpl file of whmcs. It kind of works but the css conflicts with the main theme of whmcs.
The second thing I tried was to include it with php
<?php include(path/to/header.php'); ?>
Since the header.php is located in the main www directory and whmc is on a subdomain, I was advised to try this:
include($_SERVER['DOCUMENT_ROOT'].'/header.php');
Neither of those two methods worked.
The next thing I did was a new approach. I tried implementing the whmcs layout in wordpress with a plugin called advanced Iframe. It does work but it doesn't always behave as it should and I think it is an better idea to keep whmcs completely on its own subdomain (client.domain.com)
I am no coding genius, so I'm stuck at this point. Are there any workarounds for this?
Assuming the file you're wanting to include the header in is in the same directory as header.php, then you can use
<?php include(__DIR__.'/header.php'); ?>
I have found my mistake.
Since whmcs themes are .tpl, php can't be included directly and is not recommended. What I did was create a new folder in the theme directory with all the assets and a header.tpl file.
Then I included the header.tpl like this.
{include file="$template/header/header.tpl"}
The only downside is that I have to edit the menu manually when changes are made to the WordPress site
I can't for the life of me manage to override the main shop page.
My understanding is that it's archive-product.php
I've attempted to copy it into the Woocommerce directory I created in my theme's root directory and modify it. No dice.
I've also attempted to modify it directly in the Woocommerce plugin directory. No dice there either.
I've even gone as far as adding an underscore before the archive-product.php file name in both locations (woocommerce directory and my theme template directory) in an attempt to hopefully BREAK it - just to see if I could impact SOME change - and that doesn't seem to have any effect either.
I'm not running any cache plugins and every other Woocommerce template file I've attempted to modify up until this point has worked fine.
Any ideas?
You are doing this correctly. You'll have to double check the locations as per:
Shop template is in
plugins/woocommerce/templates/archive-product.php
You can copy to my-themes/woocommerce/archive-product.php to
override the core woocommerce file.
I just had the same issue,
What worked for me, is removing the woocommerce.php file, because before, it applied the template woocommerce.php to the shop, and not the archive-product.
The answer is that when you updated to the newest version of WooCommerce, you have to "reinstall" the WooCommerce pages because the old system did not use the wc_get_page_id() function, which looks for the shop page.
Luckily this is super easy! Go to your admin, then to WooCommerce, then to System Status, then click on the Tools tab. Then click the button to the right of Install WooCommerce Pages. This will only install the missing WooCommerce pages and, get this, will reinstall the shop page with the proper wc_get_page_id.
NOTE: if you have content in the original WordPress shop page, although it didn't erase it for me, you might just want to copy the content first just in case.
I was able to fix this by using the suggestion here - Changes on archive-product.php doesn't work
but, it seems like a bug to me. WooCommerce claims that you need that root woocommerce.php page in order to incorporate the plugin into your custom theme - http://docs.woothemes.com/document/third-party-custom-theme-compatibility/ - but, this does work.
I'd love to know the reasoning behind this.
Switching to the twentyeleve/twentytwelve theme's and trying to override the archive-product.php file in the same fashion worked great, but they don't include a native woocommerce.php file in their root directory either. What gives?
I've been working on a webpage and I wanted to break it out into templates that I could pull in. For example the navbar is common to all of the webpages so it gets pulled in like this.
<?php include("templates/navigationBar.html"); ?>
As soon as I move the code out of the index.php into the templates directory IntelliJ LiveEdit plugin stops updating the main index.php (that's including stuff from the templates directory) when I make changes to one of the templates.
I figure this is because the IntelliJ IDE is "stupid" and will only tell the plugin to refresh the page when it exactly matches the page I'm working on. Is there any way to map those notifications from my templates folder into any php file that might include them?
http://confluence.jetbrains.com/display/WI/LiveEdit
http://plugins.jetbrains.com/plugin/?null&pluginId=7007
i've created a new website under a working Magento install. The old website works fine, but the new one doesn't load the theme css. I can see it loads the .phtml files when enabling Template Path Hints.
I've already checked basic things 100 of times, so...
set theme to desired one
refresh Magento cache
check source code to see whats the css path
use i.e. firebug to see what css is being loaded
can you show your file structure?
whats the theme name?