Quantcast
Channel: Topic Tag: plugin | WordPress.org
Viewing all articles
Browse latest Browse all 26892

Dana S on "[Plugin: Related YouTube Videos] results based on post title and meta_value"

$
0
0

Thanks for the update :)

I tried your code "'terms' => get_post_meta($post->ID, 'release_date', true)," and retrieving results based on this meta_value worked, but I'm having trouble retrieving results based on both the title and meta_value.

This was how my code looked:

`/* Do your configuration */
$data = $RytvAPI->validateConfiguration(
array(
'relation' => 'postTitle',
'max' => '3',
'width' => 150,
'height' => 150,
'terms' => get_post_meta($post->ID, 'release_date', true),
'lang' => 'en',
'region' => 'de',
'class' => 'left center inline bg-black',
'preview' => true
)
);...

I'm assuming "terms" and "relation" are conflicting. I tried adding " 'terms' => get_the_title( $ID ), get_post_meta($post->ID, 'release_date', true),", but only the post title or date (one or the other) seems to be getting searched for.

My question is:

Using this method, what code should I use to have the plugin search for the following three items:

1. Post Title
2. release_date
3. keyword3

I understand what code to include to search for each of these items, but I don't understand how to combine them; having the plugin search for all three items as one search with this "hardcoding method.

...search api for "postTitle"+"release_date"+"anotherkeyword" (e.g. "Isn't She Lovely"+"1976"+"remix")

Thanks in advance for any help.


Viewing all articles
Browse latest Browse all 26892

Trending Articles