• Resolved combobreaker

    (@combobreaker)


    I have created a simple array in functions.php that stores all my social links to be used throughout my site.

    $socialURLS = array(
    	"facebook"		=> "https://www.facebook.com/XXXXX",
    	"linkedin"		=> "https://www.linkedin.com/company/XXXXX",
    	"google-plus"	=> "https://plus.google.com/XXXXX",
    	"twitter"		=> "https://twitter.com/XXXXX",
    	"ustream"		=> "https://www.ustream.tv/channel/XXXXX",
    	"instagram"		=> "https://instagram.com/XXXXX",
    	"pinterest"		=> "https://www.pinterest.com/XXXXX",
    	"flickr"		=> "https://www.flickr.com/photos/XXXXX/",
    	"tumblr"		=> "https://XXXXX.tumblr.com/"
    );

    When I retrieve a URL from a page, everything works as expected. However, when I try to output anything on front-page.php, nothing outputs.

    <?php echo $socialURLS["facebook"]; ?>

    Is there anything special about front-page.php that would cause this behavior?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Retrieving variables from functions.php’ is closed to new replies.