Title: Please help with css selection code1 :D
Last modified: August 19, 2016

---

# Please help with css selection code1 :D

 *  [Rockwell_77](https://wordpress.org/support/users/rockwell_77/)
 * (@rockwell_77)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/please-help-with-css-selection-code1-d/)
 * I’m not a coder at all, but I can figure out what’s going on for the most part.
 * I’m trying to get soem code working that will choose a certain layout for a particular
   category of posts (my photo blob – category-9).
 * I am using the Arras theme, and I think I’ve located the section of code that
   selects the layouts and stylesheets. I’ve tried to insert code that I found [here](http://codex.wordpress.org/The_Loop_in_Action),
   on WordPress, that will choose a specific layout for a given category. I’m just
   not sure of syntax since I am not a coder (keep getting syntax errors in Dreamweaver).
 * Here is the code:
 *     ```
       function arras_add_layout_css() {
       	global $arras_registered_alt_layouts;
   
       	if ( count($arras_registered_alt_layouts) > 0 ) {
   
       		if ( defined('ARRAS_FORCE_LAYOUT') ) {
       			$layout = ARRAS_FORCE_LAYOUT;
       		}
       		else
       	    {
       		if ( is_category('9') ) { // Load special CSS for "Photo Blog" category 
       		{
        			?><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/category-9.css" type="text/css" media="screen" />;
       	 		}
                   else
               	{
          			<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
       			<?php } ?>
       			} else {
       			$layout = arras_get_option('layout');
       		}
   
       		?><link rel="stylesheet" href="<?php bloginfo('template_url') ?>/css/layouts/<?php echo $layout ?>.css" type="text/css" /><?php
       	}
       }
       ```
   

The topic ‘Please help with css selection code1 :D’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [layout](https://wordpress.org/support/topic-tag/layout/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [select](https://wordpress.org/support/topic-tag/select/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [Rockwell_77](https://wordpress.org/support/users/rockwell_77/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/please-help-with-css-selection-code1-d/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
