meadows.pete
Forum Replies Created
-
Forum: Plugins
In reply to: [Manual Related Posts] [Plugin: Related] Conflict with SEO All In One PackNever mind! For anyone else…
‘// Creates the output on the post screen
public function displayMetaBox() {global $post;
$post_id = $post->ID;// Get related posts if existing
$related = get_post_meta($post_id, ‘related_posts’, true);echo ‘<div id=”related-posts”>’;
if (!empty($related)) {
foreach($related as $r) {
$p = get_post($r);
?>
<div class=”related-post” id=”related-post-<?php echo $r; ?>”>
<input type=”hidden” name=”related-posts[]” value=”<?php echo $r; ?>”>
<span class=”related-post-title”><?php echo $p->post_title; ?> (<?php echo ucfirst(get_post_type($p->ID)); ?>)</span>
Delete
</div>
<?php
} // end foreach post} // end if !empty
echo ‘</div>’;
$query = array(
‘nopaging’ => true,
‘post__not_in’ => array($post_id),
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘post_type’ => ‘any’,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’
);$p = new WP_Query($query);
$count = count($p->posts);
if ($count > 0) {
?>
<p>
<select id=”related-posts-select” name=”related-posts-select”>
<option value=”0″>Select</option>
<?php
foreach ($p->posts as $thePost) {
?>
<option value=”<?php
echo $thePost->ID; ?>”><?php echo
$thePost->post_title.’ (‘.ucfirst(get_post_type($thePost->ID)).’)’; ?></option>
<?php
}
?>
</select>
</p>
<?php
} // end if count
wp_reset_query();
wp_reset_postdata();
}’Forum: Plugins
In reply to: [Manual Related Posts] [Plugin: Related] Conflict with SEO All In One Packhey guys – I’m a novice and I’m having trouble understanding how to edit the code posted by Hube2 with the fix posted by photoscope – can someone help me out?! Pretty please? 😀
Ah ha! Yes! That’s made all the difference!
A combination of too many columns, combined with lots of content in some of these columns, forces very tall rows.
I disabled a couple of the columns and my view is back to normal more or less. Many thanks Allen, much appreciated. I didn’t even think to turn columns off!
Well at least I’m not the only one. No response here yet but I don’t think I’m the only one to report it previously so let’s hope there’s a fix in the next update.
For all we know it might be something WooCommerce need to fix at their end, not something for Yoast to sort out?
Forum: Plugins
In reply to: [WooCommerce] Change "/product/" Permalink to…Actually, for what you want you can do this in WooCommerce > Settings > Pages. Look for the option:
Prepend product permalinks with shop base page (XXX)
XXX = the slug of your shop base page.
So make the slug of your shop base page /buy and then tick this option to prepend with /buy on all product pages. It’ll use /buy instead of /product
🙂
Forum: Plugins
In reply to: [WooCommerce] Change "/product/" Permalink to…I’m no expert (!) but from what I gather, you can’t get rid of the word product per se as it’s part of the woo engine, but you might be able to perform a URL Rewrite so that /product/ becomes something else? Even this might not be possible due to the way the cart works though, I seem to remember reading that it needs /product/ to power the cart and other stuff?
I’d love to know the answer to this myself though.
Forum: Plugins
In reply to: [WooCommerce] Default to DISPLAY shipping calculatorPerfect!
Thank you, Denise.
I was surprised no one answered when you asked originally and I wasn’t holding out much hope but you came to the rescue instead!
Thanks again, much appreciated. Hopefully the thread can now help others who find it too.
Forum: Plugins
In reply to: [WooCommerce] Default to DISPLAY shipping calculatorI too would like to know how to do this – anyone?!
🙂
Pete
Forum: Plugins
In reply to: [WooCommerce] small CSS change to the product page – title above imageFor anyone with the same problem, it is done via hooks!
/*—Move Product Title*/
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );
add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_template_single_title’, 5 );This thread explains all – http://wordpress.org/support/topic/most-basic-customisation-seems-impossible?replies=15 (kind of!)
Forum: Plugins
In reply to: [WooCommerce] How can I add a link as a product attribute?I don’t think attributes are set up to handle code like that.
Why don’t you create a new tab for Additional Information that contains links in the traditional sense, rather than trying to get attributes to work for you?
This should help http://wordpress.org/extend/plugins/woocommerce-custom-product-tabs-lite/
Use it to create a custom tab, call it Additional Information and then you can add as much HTML to the tab as you like.
Forum: Plugins
In reply to: [WooCommerce] Make sidebar show in archive-product.php search results?I know that feeling!
It’s not ideal in terms of the menu, but the search string is easy enough and it’s only couple of extra clicks. If the client is savvy enough to run a store they should grasp it OK I reckon. It’s better than having them create attributes for the fancy widget but fill in categories too for everything else. Better to standardise I thought.
Anyway…
mywebsite.com/?pa_room-type=double
?pa_ is what woo uses for attribute queries, room-type is the attribute name, equals the attribute term.
I created a new menu using attributes so if I ever wanted to revert the old categories based one was still there but now it’s sorted I doubt we’ll go back.
Forum: Plugins
In reply to: [WooCommerce] Make sidebar show in archive-product.php search results?“…select from dropdown THEN blue Add button” – opps! You’ll see what I mean.
Forum: Plugins
In reply to: [WooCommerce] Make sidebar show in archive-product.php search results?Haha no worries, I’m usually the one asking them! See the original post!
First of all, create your attributes via Products > Attributes.
To use the example of my site above, I’ve used attributes to categorise the rooms available by location, type, price etc, so I created a new attribute called Rooms (making sure Type is “select” not “text”).
Then I configured the terms for that attribute. In the case of Rooms the terms are single, double, twin, triple.
Now, when I’m on the product page, I just add the attributes to each product. In the Product Data area, click the Attributes tab, click the blue Add button, select the attribute type from the dropdown list, then just click into the box and select the terms from the dropdown that will appear. That’s it – just update and you’re done.
From here you can follow the rest of my instructions above and you should be able to recreate the rest of the steps to get it all sorted.
You can also enable the attributes to show on the product pages, they will appear as a list in another tab that appears, and you can also set them as variations which are priced differently – i.e each room has a different cost.
The method I’ve used also does away with Product Categories entirely – the main navigation menu is set up with custom URLs that also query attributes, so no need to use one style of navigation one place and another in the other.
Forum: Plugins
In reply to: [WooCommerce] Make sidebar show in archive-product.php search results?Hey – I should have updated this thread already, I worked it all out today 🙂 Let me explain what’s going on as best I can (apologies in advance for the long read but hopefully it’ll help).
I’m using the Modernize theme from Goodlayers which isn’t Woocommerce compatible out of the box, so I had to make a few changes. One of these was to create a new template called woocommerce.php which contained code from my theme’s page.php template, adjusted here and there. Someone else had done the hard work for me here already and this made most of the pages work with Woocommerce OK.
However, my current filtering is done using the Query Multiple Taxonomies plugin. The sidebar widget allows me to query the Product Attributes from Woocommerce automatically which is really nice, but I found the search results pages were all messed up and I was struggling with how to get them looking right. URL strings that worked from product cats were fine, product attributes not so.
I then read on another thread somewhere that I needed to take a copy of the taxonomy-product_cat.php file, rename it to match the new attribute(s) like this ‘taxonomy-pa_myattributenamehere.php’ and then add it to my theme folder.
However, the original taxonomy-product_cat.php file just contained code that called ‘product-archive.php’ and at first, I didn’t know any different/better so used that same code in my new templates but it didn’t work. I realised that it needed to be calling another template, or containing different code, but I wasn’t sure what or how.
Today I worked out that these new taxonomy-pa_attributenamehere.php templates actually needed the same code as that I created for the woocommerce.php file, as this is the code that allows my theme to play nicely with Woocommerce. So today I just copied the code from my woocommerce.php template I created for my theme into these new taxonomy templates, which then went into the root of my theme folder alongside woocommerce.php.
Job done! Now I have a 3rd party theme, tightly integrated with woocommerce and some nice filtering to boot. Happy days. It’s fairly close to Woo’s Layered Nav widget, with the added bonus of working site wide, not just the Shop page etc.
Does that help? I can dig out some extra links if you need it.
Forum: Plugins
In reply to: [WooCommerce] Make sidebar show in archive-product.php search results?Or do I have to get another theme/woocommerce template and call that archive-product.php and then upload to the theme folder? If so, which one?
Anyone? ;D