Skip to main content
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
Source Link

Referencing this question:

How to add/save Custom Field in user settings/profile "Checkbox list"How to add/save Custom Field in user settings/profile "Checkbox list"

I've been trying to get this working, but am having a few issues. I'm using the following line to query the database:

$tags = get_the_author_meta( 'user_interests', $user_ID );
<?php $query = new WP_Query( array( 'tag__in' => array( $tags) ) ); ?>

and the query returns blank. If I print_r the $tags I get

Array ( [74] => 74 )

and if I replace the $tags with 74 directly I get the current content returned. I'm missing something simple, aren't I? Could anyone point me in the right direction?

thanks!

Referencing this question:

How to add/save Custom Field in user settings/profile "Checkbox list"

I've been trying to get this working, but am having a few issues. I'm using the following line to query the database:

$tags = get_the_author_meta( 'user_interests', $user_ID );
<?php $query = new WP_Query( array( 'tag__in' => array( $tags) ) ); ?>

and the query returns blank. If I print_r the $tags I get

Array ( [74] => 74 )

and if I replace the $tags with 74 directly I get the current content returned. I'm missing something simple, aren't I? Could anyone point me in the right direction?

thanks!

Referencing this question:

How to add/save Custom Field in user settings/profile "Checkbox list"

I've been trying to get this working, but am having a few issues. I'm using the following line to query the database:

$tags = get_the_author_meta( 'user_interests', $user_ID );
<?php $query = new WP_Query( array( 'tag__in' => array( $tags) ) ); ?>

and the query returns blank. If I print_r the $tags I get

Array ( [74] => 74 )

and if I replace the $tags with 74 directly I get the current content returned. I'm missing something simple, aren't I? Could anyone point me in the right direction?

thanks!

Source Link

Saving and using Custom Field in user settings/profile “Checkbox list”

Referencing this question:

How to add/save Custom Field in user settings/profile "Checkbox list"

I've been trying to get this working, but am having a few issues. I'm using the following line to query the database:

$tags = get_the_author_meta( 'user_interests', $user_ID );
<?php $query = new WP_Query( array( 'tag__in' => array( $tags) ) ); ?>

and the query returns blank. If I print_r the $tags I get

Array ( [74] => 74 )

and if I replace the $tags with 74 directly I get the current content returned. I'm missing something simple, aren't I? Could anyone point me in the right direction?

thanks!