[Support request] Block Element Hook section for PHP

Home Forums Support [Support request] Block Element Hook section for PHP

Home Forums Support Block Element Hook section for PHP

  • This topic has 3 replies, 2 voices, and was last updated 3 weeks ago by David.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2065430
    Mohammed Arif Shaikh

    Hi,

    I am using the below PHP code through the code snippets plugin which is working fine.

    add_action( ‘wp’, ‘lh_remove_archive_title’ );
    function lh_remove_archive_title() {
    remove_action( ‘generate_archive_title’, ‘generate_archive_title’ );
    }

    However, I want to reduce the number of plugins I use for my website. I tried the Block Elements Hook section for the above PHP to create the same result that I am getting with code snippets but it’s not working.
    Can you please confirm if using this PHP is possible with the Block Elements Hook section? If yes, then what should be the options under settings and display rules?

    #2065543
    David
    Staff
    Customer Support

    Hi there,

    No, you cannot add that PHP To a Block or Hook Element.
    It has to be added to either a Child Theme functions.php or via a Code Snippets plugin.

    Code is code – so adding the code snippets plugin to add that PHP is not going to make any noticeable performance difference to your site.

    #2066958
    Mohammed Arif Shaikh

    Okay, thanks for the reply, David.

    #2067297
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.