• Hi all,

    I am trying to get the Featured Articles Plugin working on my site, but I have run into some difficulties.

    The site is here – TrueScale

    Problem 1:
    I am trying to get the plugin to appear on the homepage (In settings->reading I have the front page set to ‘home’). To do this the relevant php code for the plugin is as follows:

    function wp_featured_articles(){
    	global $FA_default, $FA_displayed;
    	if(!is_front_page() || $FA_displayed > 0) return ;	
    
    	$FA_displayed = 1;
    	$options = get_option('FA_options', $FA_default);
    	switch ($options['display_order']){
    		case 1:
    			$order = 'ASC';
    		break;
    
    		case 2:
    			$order = 'DESC';
    		break;
    	}

    You will see that there is an if(!is_front_page() that should make this happen.

    The problem is that if you go to ‘www.truescale.co.uk’ you don’t see the plugin. If you go to ‘www.truescale.co.uk/home’ it appears. Obviously this no good for me.

    Problem 2:
    As well as making the plugin appear on the homepage, I also need it to only grab articles from a certain category. I have been told that I can do this by adding ‘if(!is_category(’cat_id’) || $FA_displayed > 0 ) return;’ to the code.

    The problem is that I am still learning php, so dont know the syntax for adding this new set of code to the other code.

    Heeeeeeeelp!! 😉

The topic ‘Featured Articles Plugin – help with php’ is closed to new replies.