Ama

Ama

Did You Know?

Ama theme has private reply feature, that only admins can see.

Ama

Accordions Widget

Estimated reading: 2 minutes 497 views

Default style Toggle

Default style Accordion

No Comments

  • Eh Jewel

    October 13, 2020

    Note that get_the_content doesn’t return the same thing as what the_content displays. For that you need to do this:

    $content = apply_filters( \'the_content\', get_the_content() );
    echo $content;
    
    Reply
    • Demo User

      October 13, 2020

      If you are wanting to check if a custom (non core block) is for a page or post, include the namespace/name-of-block:

      if ( has_block( \'my-namespace/block-name\' ) ) {
       // Do stuff here.
      }
      
      Reply
  • Eh Jewel

    October 13, 2020
    // Note: does not support arrays
    if ( has_block( array( \'gallery\', \'button\' ) ) ) {
        // error
    }
     
    // Use || instead
    if ( has_block( \'gallery\' ) || has_block( \'button\' ) ) {
        // Do something.
    }
    
    Reply

Leave a Comment

Share this Doc
CONTENTS