Blog Posts

Hi Team, i have a Quick Q

i have setup the FP latest news for my blog posts on my home page i want the 3 latest posts but on the blog page i want 6…

i found out using the fp-latest-news.php file and the below works perfect by changing it to whatever number

	$r = new WP_Query( array(
		'no_found_rows'       => true,
		'post_status'         => 'publish',
		<strong>'posts_per_page'	  =&gt; 3,</strong>
		'category_name'		  =&gt; $category
	) );

Is it possible to have 3 latest posts on my home page and 6 on my blog page?

here is my link:
www.contech-solutions.com.au

thanks guys

Hello there,

Thank you for asking.

Could you please try the following code?

$per_page = 3;
if( is_page(3061) ){
  $per_page = 6;
}

$r = new WP_Query( array(
  'no_found_rows' => true,
  'post_status' => 'publish',
  'posts_per_page' => $per_page,
  'category_name' => $category
) );

Let me know how it goes. I’ll wait to hear back from you regarding your stats.

Regards,
Kharis

Mate…you are a superstar!!!

Love your work man - thanks

is there an easy way to add categories on my blog page of where it shows what categories i have and then link them to specific blog pages?/categories?

sorry when i jump to category blog it’s empty so i have no idea what’s happened:
http://www.contech-solutions.com.au/category/blog/

http://www.contech-solutions.com.au/blog
thanks guys

Hello there,

I noticed from view page source, your page won’t be loaded completely. It stops at <div class=“posts-layout”>. I guess there is an incorrectly written PHP code after that line. To help you find which line contains an error, I’d strongly suggest you to enable WP_DEBUG mode. Put the following line in the wp-config.php file which resides in the WordPress root folder.

define( 'WP_DEBUG', true );

Regards,
Kharis

hey mate, sorry man i have absolutely no idea what to do ahhahaha
i dont have any wp-config.php file in my editor

hey guys, i also noticed when i changed my site appearance and select static page to blog page - nothing shows up… so i cant view all my blog posts…

when i remove it and select none all of them come up…when i use the FP-latest news widget

any ideas

hey mate, sorry, found the file and done = define( ‘WP_DEBUG’, true );