Function has me stumped

Community Forums Forums General Discussion Function has me stumped

This topic is: resolved

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  emasai 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #91451

    emasai
    Participant
    Post count: 738

    How would I write the following to put it in the functions file and not in the hooks, presently it is on the genesis_before_loop hook

    <?php if (is_page (array (30,32,34,36,38,40,42,44,46,48,50))) { ?>
      <h1>(CRSC)</h1>
    			<h2>(Rehabilitation Center for Children with Cerebral Palsy</h2>
    	<?php }?>

    I am experiencing an early onset of brain freeze….


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    #91453

    Summer
    Participant
    Post count: 1105

    Try something like

    add_action ('genesis_before_loop', 'child_before_loop');
    function child_before_loop() {
       if (is_page (array (30,32,34,36,38,40,42,44,46,48,50))) {
          echo "<h1>(CRSC)</h1>";
          echo "<h2>(Rehabilitation Center for Children with Cerebral Palsy</h2>";
       }
    }
    

    #91457

    emasai
    Participant
    Post count: 738

    Thanks Summer, you are my saviour…!


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Function has me stumped’ is closed to new replies.