1645 posts Multimedia Artistry
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
  • Bought between 10 and 49 items
  • Exclusive Author
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
dnp_theme says
I am having a function here
function fontlist() {
    $fontsSeraliazed = wp_remote_fopen( get_template_directory_uri().'/assets/fonts/gfonts.txt' );
    $fontlist = json_decode( $fontsSeraliazed, true );
    return $fontlist;
}

and another part of code that is supposed to do give me the value of each item of the list

$fonts = fontlist();
foreach ( $fonts>items as $key => $font) {
  echo esc_attr($font->family);
}

It does not work for me, anyone has any clue on what can I do, I am very close to launching my first wp theme … :)

Thanks for any reply.

181 posts
  • Elite Author
  • Exclusive Author
  • Has been a member for 1-2 years
  • Sold between 50 000 and 100 000 dollars
  • Most Wanted Bounty Winner
  • Referred between 50 and 99 users
  • Bought between 10 and 49 items
ThemeRox says

No. Same Problem here. By the way which framework are you working? Custom or any existing? Thanks

1645 posts Multimedia Artistry
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
  • Bought between 10 and 49 items
  • Exclusive Author
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
dnp_theme says

OptionTree, but that does not matter.

1645 posts Multimedia Artistry
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
  • Bought between 10 and 49 items
  • Exclusive Author
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
dnp_theme says

get_file_contents instead of wp_remote_fopen would do !!

by
by
by
by
by
by