Wordpress - How can I edit the header of a template? - php

I am new in the using Wordpress. I downloaded this theme and because my title of the website is too long, I need to change the header of this theme.
So I went into
wp-content/themes/Gordon/header.php
I tried to update this file, but the changes I made didn't appear on the page. So I delete the entire content of this file (blank file), and when I reloaded the homepage - again - nothing has changed, no error, just nothing.
So I would like to ask you, how can I update the header of an installed theme in Wordpress.

You messed up your header.php, best way to solve it is to open the header.php from the original theme (download) and copy/paste the code to your header.php that's online, using FTP.
Create a Child theme using One-click child theme plugin, copy the header.php into this child theme using an FTP connection again.
Then make your edits here or add a style.css to edit the header using css.
Useful links
http://codex.wordpress.org/Child_Themes
http://wordpress.org/extend/plugins/one-click-child-theme/
http://codex.wordpress.org/Designing_Headers

Related

My magento theme is still loading the pages from the previous theme

I recently updated my dev magento site with a new theme, configured it and selected it as the theme in the admin panel. However when i go to the front end it is still using all of the old pages for the main content but the header and footer are the new theme.
Image of theme selection
please have a look at your theme folder path. If it is app/design/frontend/intenso/default/
Then you have to use Current Package Name Under Package as intensio(your-theme-name) & Under Themes use Default as default
For more detail, check screenshot:
Screenshot explainig solution for showing old theme
Hope it helps

How to override this WordPress plugin template file

So in plugins/yith-woocommerce-ajax-search/templates/yith-woocommerce-ajax-search.php, there is a line I want to change in the label, from "Search for:" to "Search". If I change it in this file, it's fine, but of course I want to keep the change in my own theme rather than modify it here.
So, I copied the entire plugin folder over into my theme folder and made the change, but it's not working. The path is themes/MYTHEME/yith-woocommerce-ajax-search/templates/yith-woocommerce-ajax-search.php
Any clues why this isn't working?
The plugin uses wc_get_template() to load yith-woocommerce-ajax-search.php. This means that you can put the template file directly in the themes/YOURTHEME/woocommerce/ directory, then your template should be loaded correctly.

Blank page "The active theme is broken. Reverting to the default theme." on WordPress Vagrant

I have a blank page when accessing my local, however I can login fine into /wp_admin and change the theme. In the appearances menu, I have:
The active theme is broken. Reverting to the default theme.
How can I solve this?
Some info hopefully to help you understand. As this is a Vagrant install, in the site root, I have:
/web
/assets
In web, we have the Wordpress install. web/wp/wp_content/themes contains all default Wordpress themes i.e. twentythirteen. when set, these themes work ok.
In assets, I have the actual custom theme, which needs to remain in that folder, as Gulp regenerates the theme and /less and /js files in case of changes. This is the theme which displays as broken in the admin.
The custom theme is referenced with a file in web/app/themes.
Figured it out.
If anyone comes across this issue, update your VirtualBox to latest. Theme's symbolic link was generating back slashes to the path like ..\..\ and it should have been ../../assets/theme_name

WooCommerce Template Override for Archive-Product.php (Main Shop Page) Not Working

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?

new website is not loading theme css in Magento

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?

Categories