• 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.

    • This topic was modified 4 years, 9 months ago by marcorroma.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Can you please tell me what practical scenario anticipating on your page?

    Thread Starter marcorroma

    (@marcorroma)

    I need to display a different iframe for each post’s category. I mean Facebook iframe to display the “like” button for a different facebook page.

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Can you please tell me on which position do you want category for each post?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Different code for each category’ is closed to new replies.