OLennox
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Help! the_content() not working post 3.0 upgradeI think yours sounds slightly different, if it’s using the wrong template then something is more fundamentally wrong. This problem is purely concerned with the_content() function in relation to page templates.
I think that the error is on my part; In my page templates I am not using ‘the loop’. The reason being that page templates have always worked fine without it and surely when it comes to pages there is nothing to loop.
Putting ‘the loop’ into my page templates did fix the problem but it caused other sections to break (namely where I perform sub-queries). The solution has been to keep my page templates as they were but call the_post() prior to calling the_content().
Strangely, calls to other functions such as the_title() were still working correctly with or without the_post().
I’d still be very interested to know why this problem has appeared since upgrading to 3.0 and the correct way to call the_content() in page templates.
Cheers,
Forum: Fixing WordPress
In reply to: Help! the_content() not working post 3.0 upgradeHave found the solution. For some reason I now need to call the_post(); before calling the_content();
Could someone in the know tell me why this is?
Cheers,
Forum: Fixing WordPress
In reply to: Help! the_content() not working post 3.0 upgradeUpdate:
This problem only seems to be affecting pages; posts (i.e. news articles on my site) are displaying correctly
Forum: Fixing WordPress
In reply to: Different Permalink structure for pages and posts?I’ve been poking around with this and it seems that WordPress does this functionality by default. I’m using the custom url:
/articles/%category%/%postname%
and my pages are still accessible through a permalink without the “articles” sub-directory whereas my posts are all under “articles”. Seems to be working well
———————————————————As for your other question:
I’ve not used “widgets” I’m afraid so I don’t know how they work. I use “The Loop” to render posts inside my pages. For example:
<?php global $post; $tmp_post = $post; $my_query = get_posts('numberposts=5&category_name=Sport'); foreach($my_query as $post) : setup_postdata($post); ?> //generate html using the_content() the_title() etc. <?php endforeach; $post = $tmp_post; ?>
Note that it is important to store the $post during the loop or else the rest of your page won’t render after this code block.
Hope it helps,
Olly
Forum: Plugins
In reply to: (Very) Simple Mailing List Form?I ended up writing some custom script to achieve the functionality required. Coming from a .NET background I assumed that WordPress operated as an all-encompassing application that would break if I started messing about with post backs. That is obviously not the case.
Cheers,
Forum: Plugins
In reply to: [Plugin: Fast and Secure Contact Form] only one from is workingHi, Solved this:
drop the quotes from the “form” parameter so:
[si_contact_form form=2]
I’m new to PHP but imagine it might be the is_numeric() check:
extract(shortcode_atts(array( ‘form’ => ” ), $atts));
$form_num = ”;
$form_id_num = 1;
if ( isset($form) && is_numeric($form) && $form <= $si_contact_gb_mf[‘max_forms’] ) {
$form_num = (int)$form;
$form_id_num = (int)$form;
if ($form_num == 1)
$form_num = ”;
}Cheers for all you hard work with this,
Olly
Forum: Plugins
In reply to: [Plugin: Fast and Secure Contact Form] only one from is workingI’ve also got this problem. I’m using other plug ins (such as the Next gen Gallery) which use shortcode and these are working correctly. I’m Using 2.9.2
My site is not online so cannot post url.
Cheers,