• I’m not very good at php, and using themefuse theme called philanthropy.
    I’m trying to access a url thats stored in an array that already exists in the theme. The array is called “philanthropy_tfuse_post_options” I’ve used a few different ways to look at the data contained in the array.

    <?php $meta = get_post_meta(1831, 'philanthropy_tfuse_post_options');
    var_dump( $meta );
    ?>

    gives this array:

    array(1) { [0]=> array(4) { ["philanthropy_link"]=> string(48) "https://www.fao.org/wsfs/forum2050/wsfs-forum/en/" ["philanthropy_source"]=> string(0) "" ["philanthropy_seo_title"]=> string(0) "" ["philanthropy_seo_description"]=> string(0) "" } }

    I’m trying to access the first item “philanthropy_link” and the url that comes after

    using

    <?php $meta = get_post_meta(1831, 'philanthropy_tfuse_post_options');
    echo $meta;

    returns just the word “Array”

    I cannot figure out how to access the URL contained in the array and put it into a link I have on the page.
    the ste and the page ishere!

  • The topic ‘Accesing data in a meta array’ is closed to new replies.