Adam Blythe
Forum Replies Created
-
Forum: Plugins
In reply to: Showing most recent post thumbnail of category on homepageOK I have managed to display the featured image, the post title and the post excerpt of the latest post from my category ‘work’ on my static front page using the following php code inside a conditional tag (is_front_page) in loop-page.php
<?php $args = array( 'posts_per_page' => 1, 'category_name' => work ); $myposts = get_posts( $args ); foreach ( $myposts as $post ) : setup_postdata( $post ); ?> <?php echo get_the_post_thumbnail( $post_id, 'full' ); ?> <?php the_title(); ?> <?php the_excerpt(); ?> <?php endforeach; wp_reset_postdata(); ?>Please see my complete loop-page.php file on pastebin.
Although I have achieved what I wanted, can anyone confirm if I have used the above code correctly? Is there another way to achieve this without using a plugin or widget area?
Thanks
Forum: Plugins
In reply to: Display my latest post from a category on the front pageI’m not one for grabbing code and plonking it in without understanding what’s going on, so I have scrapped this idea now and have used something similar to achieve the same result.
To display the most recent post in my category ‘work’ I have created a widgetized area on my homepage and downloaded the Recent Posts Widget Extended widget to fill it.
In the loop for loop-page.php (twenty ten theme) I have used –
<?php if ( is_front_page() ) { ?> <h2 class="entry-title"><?php the_title(); ?></h2> <?php get_sidebar( 'home' ); ?> <?php } else { ?> <h1 class="entry-title"><?php the_title(); ?></h1> <?php } ?>Hope this helps someone out there! I am now going to do some further reading about the WordPress loop.
Forum: Plugins
In reply to: Display my latest post from a category on the front pageThis article sounds very promising but how can I use this with the Twenty Ten theme?
My front page is a static page and I would like to feature the latest post from the category ‘work’.
I then need to manipulate this post so it displays the posts’s thumbnail, title and excerpt.
Which template file do I need to be editing? page.php? How will this work with the existing loop ‘get_template_part( ‘loop’, ‘page’ );’?
Thanks
Hi Nick,
I have actually just this implemented your code…it works great thanks!
There was just one problem that I had to fix though, the API name didn’t work for me.
I had to use a combination of numbers and letters associated with the custom field that you get when you generate a web-to-lead form under SalesForce – Setup – App Setup – Customise – Leads – Web-to-Lead e.g. ’00ND0000005e0pN’
Hope this makes sense!
Thanks again.
Brilliant thanks!
Thank you Nick! I will give this a try ASAP.
I guess the php goes in my functions.php?
Thanks again
Forum: Themes and Templates
In reply to: horizontal menu nested list problemI have only tested this is Firefox 26.0 and it works! Remember, I am using a child theme of Twenty Ten. I simply added the following to my editor style.css:
#access ul ul { width: auto; } #access ul ul li { width:100%; } #access ul ul a { white-space: nowrap; width:auto; }Thanks for the reply Nick.
Is there not a work around for this?
Forum: Themes and Templates
In reply to: horizontal menu nested list problemI just added
width:auto;to
#access ul ul a {}and it is a step further in the right direction!
However, the backgrounds of the sub menu list items still don’t line up!
Forum: Plugins
In reply to: [Promotion Slider] remove Continue reading…How would I implement the code above into the code you provided at the start of this thread?
Thanks
Forum: Plugins
In reply to: [Promotion Slider] remove Continue reading…Thanks Micah,
I done some reading and got it working using:
<?php function really_remove_the_2010_excerpt_filter () { remove_filter( 'excerpt_length', 'twentyten_excerpt_length' ); remove_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' ); remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' ); } add_action('after_setup_theme','really_remove_the_2010_excerpt_filter'); ?>I obtained this from a previous WP thread from a person with a similar problem.
However, am I correct in saying that the code above must remove the ‘Continue reading’ link from all excerpts on my site?
How would I remove this filter from ONLY promotion slider posts?
I don’t want this to affect other post types on my website.
Thanks again!
Forum: Plugins
In reply to: [Promotion Slider] remove Continue reading…Hi Micah,
I couldn’t remove the ‘continue reading’ link using your code above in my functions.php file.
My promotions go to internal pages on my website not to posts so the ‘continue reading’ text is not needed.
I am using a child theme of twenty ten.
Also, I would prefer to insert html for each slide using the post content box rather than the excerpt box in the admin for each slider.
Please help.
So far I am really impressed with this plugin! Great work!
Forum: Plugins
In reply to: [WooCommerce] Using WooCommerce for event / course bookings@ jameskoster,
Any updates regarding the booking plugin you mentioned previously?
Thanks
Forum: Themes and Templates
In reply to: [Fluxipress] Centering blog title, logo and navigation.I have managed to centre my title and custom logo using:
body { font-size: 15px; } img { border: 0 none; display: block; } #blog-title { display: block; font-size: 4rem; font-weight: 300; line-height: 0.8em; margin: 0.3em 0 0.3em -0.05em; overflow: hidden; padding: 0.2em 0 0; text-align: center; } #blog-title span, #blog-title strong span { font-size: 0.425em; text-align: center; } #blog-title img, #blog-title strong img { float: none; margin: -0.2em auto 0.25em; } #blog-title { padding-right: 0; }The only problem I’m having now is the rollover transition when you rollover #header and the text ‘Home’ is revealed. It’s a nice touch but it’s not what I want for my website. It looks to me there is some inline styling involved where can I find it to change it?
The simple transitioned rollover on your demo fluxipress website save the gummy bears is awesome. I want my header like this!
Thanks again.
Forum: Themes and Templates
In reply to: [Fluxipress] Child theme of Fluxipress not workingThanks so much Michael! It worked!