richarduk
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Childishly Simple] Center top Navigation menu wordpress 3.8It works on latest versions of FF, Chrome, Safari,Opera and also on IE8.
It flicks to the center – yep, that’s JQuery for you. It’s the least-worst solution that I’ve found and I spent a LOT of time looking.:-)
Loading JQuery in different places in the document – makes no difference, tried that.Update: incidentally if your website resizes on phones etc. (responsive design) then the menu might well then flow onto the next line and break – it’s not a pretty sight.
Forum: Themes and Templates
In reply to: [Childishly Simple] Center top Navigation menu wordpress 3.8Sorry. Tested it, but only works for menus that are on a single line. If the menu overflows onto the line below then it breaks. Not really ideal.
Put this in the very top options box.
For top menus:
<script type="text/javascript"> jQuery(document).ready(function($) { var listwidth = 0; $('ul.top-navigation > li.menu-item').each(function() { listwidth += $(this).outerWidth( true ); }); var containerWidth = $('div.top-navigation').width(); var paddingleft = (containerWidth - listwidth)/2; var finalcontainerwidth = (containerWidth - paddingleft); $('ul.top-navigation').css({'padding-left': paddingleft, 'width':finalcontainerwidth}); }); </script>For bottom menus:
<script type="text/javascript"> jQuery(document).ready(function($) { var listwidth = 0; $('ul.bottom-navigation > li.menu-item').each(function() { listwidth += $(this).outerWidth( true ); }); var containerWidth = $('div.bottom-navigation').width(); var paddingleft = (containerWidth - listwidth)/2; var finalcontainerwidth = (containerWidth - paddingleft); $('ul.bottom-navigation').css({'padding-left': paddingleft, 'width':finalcontainerwidth}); }); </script>Forum: Themes and Templates
In reply to: [Childishly Simple] Center top Navigation menu wordpress 3.8This might help:
Forum: Themes and Templates
In reply to: [Childishly Simple] Theme: childishly simple. Search problem.Hmm. It’s very strange. I did a test using Relevanssi giving 100% weight to tags and nothing else and as you say in my theme there were no results. But in the default 20/12 theme there was a result.
I then deactivated the plugin and did a standard search for the same item, this time without any tag weighting ‘cos the plugin had been activated, and got a result. So the basic search functionality is working.
I’ll have to try and figure it out.Forum: Themes and Templates
In reply to: [Childishly Simple] Lost images in postsApologies. It never occurred to me when I made the original image that font-sizes would be changed (which is daft of me because it’s a regularly requested feature)
I’ll upgrade the sprite and the CSS for the next releaseForum: Themes and Templates
In reply to: [Childishly Simple] Creating drop down sub menuMy mistake, I misunderstood. I can only suggest http://wordpress.org/plugins/dropdown-menu-widget/ (haven’t tried) or this http://wordpress.org/plugins/jquery-vertical-accordion-menu/ (have tried, very nice, don’t know if it;s what you’re looking for)
Forum: Themes and Templates
In reply to: [Childishly Simple] Creating drop down sub menudiv.post, div.page, div.attachment {margin:0 3% 0 4%;}where 3% is the left margin and 4% is the right margin. Or you can use px e.g. 20px
Forum: Themes and Templates
In reply to: [Childishly Simple] Creating drop down sub menuGo to Appearance/Menus. Create and name a top or bottom menu (Eidt Menus / create a new menu). Select the relevant Page in the left hand side and click ‘A to Menu’. Click ‘Save Menu’. Go to ‘Manage Locations’ (top of that page). Theme locations / top menu / select the menu that you’ve just created. Clic ‘Save Changes’
Forum: Plugins
In reply to: [WooCommerce] WooCommerce Product Images Blurry and not FittingNow what indeed 🙂
View source and you’ll get this:
<img width="150" height="150" src="http://forlagetmunay.dk/wp-content/uploads/2013/11/Lydbog_dvd-150x150.png" class="attachment-shop_catalog wp-post-image" alt="Lydbog_dvd" />Click on the link part of that and it’ll take you to the image
http://forlagetmunay.dk/wp-content/uploads/2013/11/Lydbog_dvd-150x150.pngThe images are more or less – nearly – the same size. As I mentioned above in my case I was happy enough with that, it wasn’t worth digging any deeper. You should have noticed when you added the CSS and refreshed the page that the images shrunk slightly, so it has done something. If you want bigger images then you’re going to have to reset the image size in WooCommerce and either upload new images (try one test one) or regenerate the images.
Forum: Plugins
In reply to: [WooCommerce] WooCommerce Product Images Blurry and not FittingTry this:
ul.products li.product img {width:auto;border:1px solid red;}Get rid of the border, it’s just there to show that we’re in the right ballpark
Forum: Plugins
In reply to: [WooCommerce] WooCommerce Product Images Blurry and not FittingPost a link and I’ll take a look. Can’t promise anything
Forum: Plugins
In reply to: [WooCommerce] WooCommerce Product Images Blurry and not FittingThe way I did it was to look at the class of the images – FireFox / Web Developer or FireFox / Inspect element.
Then I viewed the CSS (Web Developer /CSS /View CSS) and found the stylesheet that WooCommerce had created. It was pretty crammed but I pasted it into EditPad and searched through it for the relevant classes. It was immediately obvious that most of them had been set a large width (48% if I remember). I then extracted those selectors and declarations and changed the width from 48% to auto. I might have added a height:auto, can’t remember now.
You then paste the whole lot into the bottom of any relevant stylesheet or create an internal stylesheet and the new styles will over-ride the old.
Amendment to previous post of mine, not that anyone really cares 🙂
WooCommerce where they’ve been far too specific in their external stylesheet, setting images to 48% of the width of the page, meaning that the inline styles can’t be over-ridden by the external styles
should have been
WooCommerce where they’ve been far too specific in their external stylesheet, setting images to 48% of the width of the page, meaning that the inline styles can’t over-ride the external styles
Forum: Themes and Templates
In reply to: [Childishly Simple] Page of postsHi Tony, I’ve used your code on my site and it works fine but I used the ID, not the slug. Maybe you’ve got the slug wrong? You could try using the id instead (usually a safer idea in case you change the slug later). I use ‘WP show IDs’ to get the IDs.
Theme file conflict with plugins – extremely unlikely. Theme functions have to have a unique name for a start. Best way to check is to run the default theme 2013 and see what happens. If you get the same problems it’s the plugins. If all problems disappear it’s my theme (and I’d be interested in knowing what plugins are causing the problems)
Forum: Themes and Templates
In reply to: [Childishly Simple] Page of postsChild folder.
🙂
Forum: Themes and Templates
In reply to: [Childishly Simple] Page of postsMake copy of page.php
At the very top put something like this:
<?php /* Template Name: Example multiple posts Page */ ?>Immediately below
<?php wp_reset_query( );?>paste this
<?php $loop2 = new WP_Query( 'orderby=title&posts_per_page=5&cat=45' ); ?> <?php if ( $loop2->have_posts( ) ) : while ( $loop2->have_posts( ) ) : $loop2->the_post( ); ?> <div <?php post_class( $childishlysimple_file_name );?>> <h1 class="page"><?php the_title_attribute( );?></h1> <div class="entry entry-page"> <?php the_content( '' ); ?> </div> <!--Close entry--> </div><!--Close post htentry etc. --> <?php endwhile; ?> <?php else : ?> <p> Sorry, no posts were found! </p> <?php endif; ?> <?php wp_reset_query( );?>Obviously change around cat. 45 and post_per_page =5 and orderby
Richard