Different code for each category
-
Hi, is it possible to “convert” this code to AMP version?
I believe it doesn’t have to be a php code in the AMP version.<?php echo '<div class="CLASS-HERE">'; $catarray = get_the_category( $post->ID ); $catid = $catarray[0]->term_id; if ($catid == CLASSIDHERE) { echo 'CUSTOM CODE HERE';} ;?>
I need to display a different code for each post in different categories.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Different code for each category’ is closed to new replies.