david221
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Customizing WooCommerce as a multi-page checkout pageThanks for the reply again, Mike.
What about other websites who have used Woocommerce for their checkout information? I realise it may be too soon to know what the complications could be specifically, but are there any issues and complications that store owners should be aware of?
Forum: Plugins
In reply to: [WooCommerce] Email confirmations and Woocommerce checkout fomsThanks Mike. I found more information about that extension on the WooThemes docs.
https://docs.woothemes.com/document/automated-follow-up-emails-docs/
Forum: Themes and Templates
In reply to: Can you use WP Query to exclude custom posts from archives?Well, after taking another hard look at the Class Reference for queries, I was able to get what I want by specifying the ‘post__not_in’ array to tell it which post ID not to retrieve:
query_posts(array('post_type' => 'latest_news', 'posts_per_page' => 100, 'post__not_in' => array(297)));
Although I’m happy with what I’ve got at the moment, this is only something handy I need to know in the short term. The next step I need to know is how to create a function that allows you choose where you want a post excerpt to appear on screen. Something similar to the WP Hide Post plugin, but I need to find out how to code it for custom post types.
Many thanks at the moment.
Never mind, I worked it out by structuring my code carefully.
/*-----------------------------------------------------------------------------------*/ // Content Wrap Markup - skeleton_content_wrap() // Be sure to add the excess of 16 to skeleton_before_sidebar() as well /*-----------------------------------------------------------------------------------*/ if ( !function_exists( 'skeleton_content_wrap' ) ) { function skeleton_content_wrap() { $latest_blog_posts = new WP_Query( array( 'posts_per_page' => 1 ) ); $columns = ''; $columns = apply_filters('skeleton_set_colwidth', $columns, 1); echo '<a id="top"></a>'; if ( is_front_page() ) { if($latest_blog_posts->have_posts()): echo "<div class=\"home-slider\">"; echo "<div class=\"homepage-slider\">"; echo '<img src="'.get_site_url.'/wp-content/uploads/2015/02/slider01.jpg">'; echo "</div>"; while ($latest_blog_posts->have_posts()): $latest_blog_posts->the_post(); echo "<div class=\"image\">"; echo "<div class=\"slide\">"; echo "<div class=\"slide_image\">"; echo the_post_thumbnail(); echo "</div>"; echo "<div class=\"slide_title\">"; echo the_title(); echo "</div>"; echo "</a>"; echo "</div>"; endwhile; echo "</div>"; echo "</div>"; endif; wp_reset_postdata(); } else { /*echo '<h1 class="entry-title">';*/ /* echo the_title();*/ /*echo '</h1>';*/ } echo "<div id=\"wrap\" class=\"container\">"; echo '<div class="entry-content">'; echo '<div id="content" class="'.$columns.' columns">'; } add_action( 'skeleton_before_content', 'skeleton_content_wrap', 1 ); }
Forum: Fixing WordPress
In reply to: Loading latest post excerpts into home page slider?Thanks Will. But I started using this jQuery package called Owl Carousel, and I was able to load the latest post on the home page. This is what I’ve done to achieve this:
//Header.php (sourcing the CSS, JS jQuery under wp_head();) <link rel="stylesheet" href="<?=bloginfo('template_url')?>/owl-carousel/owl.carousel.css"/> <link rel="stylesheet" href="<?=bloginfo('template_url')?>/owl-carousel/owl.theme.css"/> <script src="<?=bloginfo('template_url')?>/js/jquery-1.12.0.min.js" type="text/javascript"></script> <script src="<?=bloginfo('template_url')?>/owl-carousel/owl.carousel.min.js" type="text/javascript"></script>
//Default Home Template php file <?php $latest_blog_posts = new WP_Query( array( 'posts_per_page' => 1 ) ); if($latest_blog_posts->have_posts()): ?> <div class="home-slider"> <?php while ($latest_blog_posts->have_posts()): $latest_blog_posts->the_post(); ?> <div class="slide"> <a href="<?=the_permalink()?>"> <div class="slide_image"> <?php the_post_thumbnail('homepage-slider'); ?> </div> <div class="slide_title"> <?=the_title()?> </div> </a> </div> <?php endwhile; ?> </div> <script> $(document).ready(function() { $(".home-slider").owlCarousel({ navigation : false, slideSpeed : 300, paginationSpeed : 400, singleItem : true, autoPlay : true }); }); </script> <?php endif; wp_reset_postdata() ?>
//Functions.php file (to adjust the size of the image in the slider) if(function_exists('add_image_size')){ add_image_size('homepage-slider', 1200, 300, true); }
With that part out of the way, I want to know if it’s possible to add two new slides that only contain images, together with the latest post slider. I’m trying to look up the WP codex for examples, I haven’t found anything yet.
Forum: Plugins
In reply to: [Snazzy Maps] Map isn't showing – getting a grey picture insteadGood news, I finally worked it out!
Upon days of analyzing the site, I realized that the map was loading, but my CSS was preventing it to show on screen. So what I did was I added this block of code to remove the grey screen and make the map work properly again:
#map_canvas img { max-width: none !important; }
Thank you very much for the time and effort in trying to solve this query. Much appreciated. ??
Thank you, pipdig. I’ll restore that if statement in the functions file and disable the Juiz Last Tweet Widget plugin till there is further notice.
Okay, well I think I’m going to confirm that this is resolved now since I have solved the problem, I guess. I repeat, all I did was comment out that entire if statement that I highlighted, and the php error is gone.
Well, what I’ve done at the moment I commented out that entire if statement and it has fixed that error. But I’d like to know whether or not it’s best practice, and I’m open for more secure solution, should there be one.
Forum: Plugins
In reply to: [Snazzy Maps] Map isn't showing – getting a grey picture insteadAny feedback yet?
Forum: Plugins
In reply to: [Snazzy Maps] Map isn't showing – getting a grey picture insteadHi,
Just letting you know that I sent a private email to Snazzy Maps support last week. Please let me know if you received it, and if you didn’t, I’ll happily send it again.
Thanks.
Thanks James. Will do.
Yes, I knew it would only sort by post ID in the database and not via the custom order.
Thanks for the help anyway.
Hi, sorry for the late reply.
When I built this site, I first published each page and then changed the order i.e. Page Attributes->Order.
All the pages on my site map are definitely published, and I don’t have any posts pending or anything else saved as a draft.
I think the problem is I first published the third page of my site before I created the second page.
Thanks for your response David.
I checked out the instructions under Settings and I managed to exclude the pages and posts that didn’t belong there, e.g.:
[simple-sitemap types="page" orderby="ID" exclude="1,2,3"]
‘Order By’ rearranges the order the site map according to the post/page ID. That did half the trick. But the problem at the moment is that two page links are not in the correct order on the site map. Why is this the case? I had these pages re-arranged according to how I wanted by configuring the order number i.e. 1) Home 2) About 3) Products 4) Contact. Does the ‘orderby’ shortcode only identify the ID when the page is first published?