Skip to main content
added 3 characters in body
Source Link
cybmeta
  • 20.6k
  • 5
  • 47
  • 56

Well, you are using:

get_post_meta(get_the_ID(), 'subtitle', TRUE);

So, you are saying to Wordpress to get the meta value of the 'subtitle' field and that the returned value be in format of string. See get_post_meta() docu.

To get all meta data of a post you should use get_post_custom() function instead. For example, if you are inside the loop:

$custom = get_post_custom();
foreach($custom as $key => $value) {
     echo $key.': '.$value.'<br />';
}

This will return all meta data of the post. If you want to check, for example, the "price" meta field:

if(isset($custom['price'])) {
    echo 'Price: '.$custom['price'];$custom['price'][0];
}

Well, you are using:

get_post_meta(get_the_ID(), 'subtitle', TRUE);

So, you are saying to Wordpress to get the meta value of the 'subtitle' field and that the returned value be in format of string. See get_post_meta() docu.

To get all meta data of a post you should use get_post_custom() function instead. For example, if you are inside the loop:

$custom = get_post_custom();
foreach($custom as $key => $value) {
     echo $key.': '.$value.'<br />';
}

This will return all meta data of the post. If you want to check, for example, the "price" meta field:

if(isset($custom['price'])) {
    echo 'Price: '.$custom['price'];
}

Well, you are using:

get_post_meta(get_the_ID(), 'subtitle', TRUE);

So, you are saying to Wordpress to get the meta value of the 'subtitle' field and that the returned value be in format of string. See get_post_meta() docu.

To get all meta data of a post you should use get_post_custom() function instead. For example, if you are inside the loop:

$custom = get_post_custom();
foreach($custom as $key => $value) {
     echo $key.': '.$value.'<br />';
}

This will return all meta data of the post. If you want to check, for example, the "price" meta field:

if(isset($custom['price'])) {
    echo 'Price: '.$custom['price'][0];
}
added 1 character in body
Source Link
cybmeta
  • 20.6k
  • 5
  • 47
  • 56

Well, you are using:

get_post_meta(get_the_ID(), 'subtitle', TRUE);

So, you are saying to Wordpress to get the meta value of the 'subtitle' field and that the returned value be in format of string. See get_post_meta() docu.

To get all meta data of a post you should use get_post_custom() function instead. For example, if you are inside the loop:

$custom = get_post_custom();
foreach($custom as $key => $value) {
     echo $key.': '.$value.'<br />';
}

This will return all meta data of the post. If you want to check, for example, the "price" meta field:

if(isset($custom['price'])) {
    echo 'Price: '.$custom['price'];
}

Well, you are using:

get_post_meta(get_the_ID(), 'subtitle', TRUE);

So, you are saying to Wordpress to get the meta value of the 'subtitle' field and that the returned value be in format of string. See get_post_meta() docu.

To get all meta data of a post you should use get_post_custom() function instead. For example, if you are inside the loop:

$custom = get_post_custom();
foreach($custom as $key => $value) {
     echo $key.': '.$value.'<br />';
}

This will return all meta data of the post. If you want to check, for example, the "price" meta field:

if(isset($custom['price']) {
    echo 'Price: '.$custom['price'];
}

Well, you are using:

get_post_meta(get_the_ID(), 'subtitle', TRUE);

So, you are saying to Wordpress to get the meta value of the 'subtitle' field and that the returned value be in format of string. See get_post_meta() docu.

To get all meta data of a post you should use get_post_custom() function instead. For example, if you are inside the loop:

$custom = get_post_custom();
foreach($custom as $key => $value) {
     echo $key.': '.$value.'<br />';
}

This will return all meta data of the post. If you want to check, for example, the "price" meta field:

if(isset($custom['price'])) {
    echo 'Price: '.$custom['price'];
}
added 1 character in body
Source Link
Brad Dalton
  • 7k
  • 2
  • 36
  • 47

Well, you are using:

get_post_meta(get_the_ID(), 'subtitle', TRUE);

So, you are saying to Wordpress to get the meta value of the 'subtitle' field and that the returned value be in format of string. See get_post_meta() docu.

To get all meta data of a post you should use get_post_custom() function instead. For example, if you are inside the loop:

$custom = get_post_custom();
foreach($custom as $key => $value) {
     echo $key.': '.$value.'<br />';
}

This will return all meta data of the post. If you want to check, for exapleexample, the "price" meta field:

if(isset($custom['price']) {
    echo 'Price: '.$custom['price'];
}

Well, you are using:

get_post_meta(get_the_ID(), 'subtitle', TRUE);

So, you are saying to Wordpress to get the meta value of the 'subtitle' field and that the returned value be in format of string. See get_post_meta() docu.

To get all meta data of a post you should use get_post_custom() function instead. For example, if you are inside the loop:

$custom = get_post_custom();
foreach($custom as $key => $value) {
     echo $key.': '.$value.'<br />';
}

This will return all meta data of the post. If you want to check, for exaple, the "price" meta field:

if(isset($custom['price']) {
    echo 'Price: '.$custom['price'];
}

Well, you are using:

get_post_meta(get_the_ID(), 'subtitle', TRUE);

So, you are saying to Wordpress to get the meta value of the 'subtitle' field and that the returned value be in format of string. See get_post_meta() docu.

To get all meta data of a post you should use get_post_custom() function instead. For example, if you are inside the loop:

$custom = get_post_custom();
foreach($custom as $key => $value) {
     echo $key.': '.$value.'<br />';
}

This will return all meta data of the post. If you want to check, for example, the "price" meta field:

if(isset($custom['price']) {
    echo 'Price: '.$custom['price'];
}
added 188 characters in body
Source Link
cybmeta
  • 20.6k
  • 5
  • 47
  • 56
Loading
Source Link
cybmeta
  • 20.6k
  • 5
  • 47
  • 56
Loading