Widget area in WordPress theme - php

I've a theme that i converted from HTML into WP everything work nice but sidebar is not in it place! showing Widgets in the down!
Widgets are ok and in the right place in single.php but in index.php and page.php are not.
I already tried with style.css file but still not solved. what do you think? what should I do?
http://s14.postimg.org/ul2401b4h/Fire_Shot_Screen_Capture_004_robert_s_Blog.png
Thanks.

Related

Woocommerce template and css issues

I am creating a Wordpress custom theme, and I've been having issues with my woocommerce template rendering. Firstly, not all of the pages are showing up (some of them are reverting to the index.php and page.php files). Secondly, for the pages that are showing up (the single product page, the archive products page), the css is not being applied. I have tried everything suggested on the docs (hooks), but I have failed. Here is a link to my github for you to see the file structure.
https://github.com/naderae/elbe-collections
possible issues wuth my code:
my code is not written in the standard wordpress way. I only have three pages so far, index.php, page-about.php, and page-team.php, which work fine. page.php and single.php are empty. thus, my site consists of 2 pages, and index.php.
I've been struggling with this for 2 days, and would really appreciate some guidance of hoe to get me back on track. Cheers
Below is a list of some basic theme templates must preset in theme, more about this in details click here.
index.php
style.css
header.php
single.php
page.php
category.php
archive.php
404.php
I would recommend you to start with some default WordPress theme like twentyseventeen theme or other. These themes will have all basic functionality of WordPress. Check functions.php in the theme folder to customize/add functionality.
for more details about Template Hierarchy click here
Customize WooCommerce
Template structure & Overriding templates via a theme - link
Customizing WooCommerce - link
To overwrite woocommerce css you need to add a woocommerce folder to your theme. And go from there.
Woocommerce will also always use their own templates so the easiest way to change the layout is to use a child-plugin from woocommerce.

How to add custom header and footer for wordpress theme

In my project, I'm using WordPress for blog pages and I just wanted to change the appearance of the header and footer of WordPress theme and I don't want to use any plugin for creating header and footer,
can anyone tell me where I can edit the header and footer code.
/wp-content/themes/YOUR__THEME/header.php , footer.php
It's easy. You can edit the footer.php and header.php on the theme folder with the HTML/PHP code that you want.
Note: The theme folder is in /wp-content/themes/{theme_name} folder.

WooCommerce not showing templates

Hi i'm creating a webshop with WooCommerce but with a self made theme, now showing the content-single-template works fine, however the cart/checkout page is not working. This is what i've done so far:
• Add woocommerce.php in the root of my theme with woocommerce_content() inside.
• Created "woocommerce" directory in the root of my theme inside this directory another one "checkout" and inside there my custom form-checkout.php
• Shortcodes on every page are included
• Clean install WooCommerce
• Flushed permalinks
I've read trough this article from WooCommerce on how to integrate it and followed every step precisely.
When i switch to a differend theme it does show the cart/checkout page so wondering what i'm overseeing here.
Thanks
EDIT:
Contents: woocommerce.php
<?php
get_header();
woocommerce_content();
get_footer();
Got it fixed, because i basically created my own theme i started switching theme's and see the difference between mine and the working theme.
What fixed it for me was in content.php placing this:
<?php the_content(); ?>
The Proper way to work with WooCommerce Templates is, Copy the templates folder from your /wp-content/plugins/woocommerce/templates/ and paste it in your theme like /wp-content/themes/your-theme/ and rename it to /woocommerce/ So It would be like this
/wp-content/themes/your-theme/woocommerce/ and then you can edit the templates and change the UI.

Remove sidebar in wordpress (Woocommerce, bazar theme)

I am trying to remove the default sidebar in wordpress. I tried several method's but none of them worked. I even tried editing the template files.
I am using woocommerce with the bazar theme.
just rename sidebar.php file in your theme directory and refresh the page if this not gonna help inspect the sidebar pick up the main div class name search the theme and comment the code . one of the easiest but not recommended way is to display none the div in style.css

Wordpress not recognising my custom theme

I've been making a basic custom theme and everything was working fine. I had just finished pretty much styling everything in the blog section, left my computer for around 10 mins came back and it reverted back to the default twentyfourteen theme, claiming that my theme file was missing ('the template file'). I double checked and the file is still there so no idea what is going here?
This is what the top of my CSS looks like:
/*
Theme Name: AppTh.at
Theme URI: http://shjohnson.co.uk
Author: Samuel Johnson
Author URI: http://www.shjohnson.co.uk
Description: A simple theme developed to market AppTh.at's products
Version: 1.0
This theme, like WordPress, is licensed under the GPL.
AppThat is part of the MonkeyFind Brand
*/
Someone mentioned trying to add 'Template: appth.at' but that didnt seem to do anything except show up the theme then when i tried to activate it, it said it was broken?
How your directory structure should look like:
wp-content
themes
your-theme
index.php
style.css
Your CSS header looks fine, does your theme also has a index.php file? If not then you should add one this is required.
Adding Template: appth.at is not required, this is only needed when your creating a child theme, if you are then you should note the folder of the parent theme there. ie if you're creating a child theme for Twenty Eleven then you write: Template: twentyeleven
First the obvious:
you need to put the theme's folder in the WordPress theme directory
you need to have a style.css and a index.php
That should do it, but there may be other problems of course (even though the theme should show on the theme page).
WordPress codex offers clear information on theming:
http://codex.wordpress.org/Theme_Development#Theme_Stylesheet
http://codex.wordpress.org/Theme_Development#Template_Files

Categories