jainsy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: the_post_thumbnail() not working for pagesThanks so much keesiemeijer. Very helpful.
For anyone else reading.. you will have to remove existing featured images and then re upload a new featured image for each post. Changes will then take effect.
Forum: Fixing WordPress
In reply to: the_post_thumbnail() not working for pages<?php echo get_the_post_thumbnail($pageChild->ID, array(50,50)); ?>I am trying it with the above code you suggested. As you can see here the two featured products thumbnails are now smaller in size but are not rectangular.
I have also added the following into my themes function file
add_theme_support( 'post-thumbnails' ); if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 50, 50 ); // default Post Thumbnail dimensions } if ( function_exists( 'add_image_size' ) ) { add_image_size( 'featured-thumb', 50, 50 ); add_image_size( 'featured-product-thumb', 100, 100 ); }So when using
<?php echo get_the_post_thumbnail($pageChild->ID, 'featured-product-thumb') ?>I expect the thumbnails to be 100x100px. Instead they are 100px high and a different width.Any idea?
Thanks for help so far!
Forum: Fixing WordPress
In reply to: the_post_thumbnail() not working for pagesI think this is not within the loop. Try it with get_the_post_thumbnailThanks this is now partially working using the following
<?php echo get_the_post_thumbnail($pageChild->ID, 'thumbnail', array(150,150)); ?>However, on the homepage I have a div on the left with ‘featured products’ and also on the product pages there is a similar products div (on the right). I only want these thumbnails to be 50px wide so I change the array to array(50,50). However these show at 150x150px.
Any ideas?
Forum: Fixing WordPress
In reply to: the_post_thumbnail() not working for pagesHave applied recommended suggestion, however, the problem persists
Forum: Fixing WordPress
In reply to: the_post_thumbnail() not working for pagesYep, link is here.
The parent page lists all child pages. The blank space to the left of the name and description is where the_post_thumbnail() should be displaying the image.
Code being used is like this
<?php $child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' ORDER BY menu_order", 'OBJECT'); ?> <?php if ( $child_pages ) : foreach ( $child_pages as $pageChild ) : setup_postdata( $pageChild ); ?> <? $pricefrom = get_post_meta($pageChild->ID, 'Quantity24', $single = true); ?> <? $colours = get_post_meta($pageChild->ID, 'Colours', $single = true); ?> <? $smalldescrip = get_post_meta($pageChild->ID, 'SmallDescrip', $single = true); ?> <? $OutlineImg = get_post_meta($pageChild->ID, 'OutlineImg', $single = true); ?> <? $ProductCode = get_post_meta($pageChild->ID, 'ProductCode', $single = true); ?> <a href="<?php echo get_permalink($pageChild->ID); ?>"><?php the_post_thumbnail(array(150,150)); ?></a> <h2 class="gridtitle"><a href="<?php echo get_permalink($pageChild->ID); ?>" rel="bookmark" title="<?php echo $pageChild->post_title; ?>"><? echo $ProductCode ?> <?php echo $pageChild->post_title; ?></a></h2> <?php endforeach; endif; ?>Edit ‘i’ve removed some non essential bits such as formatting to reduce post size.
Forum: Fixing WordPress
In reply to: the_post_thumbnail() not working for pagesHave tried all of these.
Deactivated all the plugins, but still no page thumbnails.
Also switched to the TwentyTen theme – no luck.
Reset plugins via phpmyadmin, still nothing.
The site url is universityhoodiesdirect.com.
This is becoming quite frustrating!Forum: Hacks
In reply to: Code to display child pages & thumbnails that worked before v. 3.1please.. anyone?
Forum: Fixing WordPress
In reply to: Manual update lost uploaded contentI can see all my uploaded content and it all works now for some reason when manually entering the url. However, the links on my pages are all broken see for what I mean. Its a bit weird.
Forum: Fixing WordPress
In reply to: Manual update lost uploaded contentYep, have down, but still does not work. It works for the uploading of new files but not old files.
I have not changed the structure or location of where images are stored, they are organized by year and month and are in wp-content/uploads as per default.
Forum: Fixing WordPress
In reply to: Automatic update failure!What I meant was, I am shown a blank page because wordpress is unable to find my theme files. I did not change or overwrite anything from /wp-content though.
Make a backup of your your wp-config.php. Copy all relevant information from your wp-config.php to wp-config-sample.php and save it as wp-config.php. That’s the safest way.
I have done this but no success. For some reason /wp-admin cannot see anything in /wp-content
Forum: Fixing WordPress
In reply to: Automatic update failure!thanks for your help so far keesiemeijer.
I have saved copies of my old ones. Should I compare my old wp-config.php and wp-config-sample.php with my new ones?
They both look fine. The only thing is the W3 Super Cache plugin. Between the sample and actual config file. I have removed this to no avail.
Permalink structures were already the same. I just see no plugins or themes available, this must be the reason the site displays as blank? I’ve tried installing a new one but it say public_html is not writeable…??
Forum: Fixing WordPress
In reply to: Automatic update failure!Thanks guys.
Have completed the upgrade. However, wordpress retains all the content I can see all posts and pages from within wp-admin but it does not recognise any of the themes or plugins that remained in the wp-content folder. So on type the site url into the address bar I am just shown a blank page.
Any idea here?
Forum: Fixing WordPress
In reply to: Automatic update failure!I have tried all apart from re-uploading, so will give this ago.
Does this mean I will need to back-up from database once reinstalled though?
Forum: Fixing WordPress
In reply to: Denied access to my CGI bin!anyone?
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] User add fields?The reason I require this is because I would like a form for my customers to enter some data about each product they require.
We sell hoodies and customers order different quantities, so if they order 20 we want 20 fields of the following; size and personalised text (we print the text on them).
Obviously quantities are different per customer. So if they order 30, we’d want 30 fields. I’d then like to export this as a CSV using the Contact Form 7 database plugin.
Looks like i’m going to have to write something in PHP then.. 🙁