Help – trying to apply div styles to PHP output
-
hwody folks
i have what i hope is a not-too-complicated question
i have been trying to teach myself php though i dont quite understand the syntax yet
was able to make this nifty line in my archive.php that display a menu + title + description, or else title and description only, depending on what cat archive the user is looking at
<?php if (is_category(array(4,84,335)) && function_exists('wp_snap')) { echo "<h1>"; single_cat_title(''); echo "</h1><h2>" . category_description(); echo "</h2>" . wp_snap(); echo "<hr>"; } else { echo "<h1>"; single_cat_title(''); echo "</h1><h2>" . category_description(); echo "</h2><hr>"; } ?>
the part i can’t quite seem to get though is if I want to apply a div tag/style to the menu output, where does that fit in?
Seems like it should in this section somehow:
echo "</h2>" . wp_snap(); echo "<hr>";
…but i every time i try to stick <div style=””> or </div> around the wp_snap function like this:
echo "</h2><div id="menufix">" . wp_snap(); echo "</div><hr>";
…the page fails
Anyone know what the syntax for this might be? Am I even going about this the right way?
many thx in advance
alex
- The topic ‘Help – trying to apply div styles to PHP output’ is closed to new replies.