Dana S
Forum Replies Created
-
Forum: Plugins
In reply to: [WPMovieLibrary] Keep plugin working on front end regardless of php versionThis comment is straying from my original question, but I just thought, “I wonder if editing wordpress core file code to make it include the php version in its default htaccess generation would work”. t expect and answer to this question and I wouldn’t know how to do it, but it makes for good conversation. Just a thought.
ok, I didn’t make the connection with using the code while the plugin was deactivated…The path replacement makes sense now. Thanks again!
Awesome thanks again!
Thanks for the update with the code and ” php include” suggestion. The code you provided before worked, out of curiosity, is there a reason this replacement:
$file = str_replace( ‘/’, DIRECTORY_SEPARATOR, ABSPATH ) . ‘lib’ . DIRECTORY_SEPARATOR . ‘RelatedYouTubeVidoes’ . DIRECTORY_SEPARATOR . ‘API.php’;
is better than this:
$file = str_replace( ‘/’, DIRECTORY_SEPARATOR, ABSPATH . ‘wp-content/plugins/related-youtube-videos/lib/RelatedYouTubeVideos/API.php’ );
?
Thanks again for your helpful replies!
DanaI just have one more request regarding the new code you provided. Everything still works fine, but I was curious if there a way to display the youtube video title as the alt or title tag for preview images?
Something like this:
... echo '<a href="' . $videoLink . '"><img src="https://img.youtube.com/vi/' . $videoID . '/0.jpg" title="$videoTitle" width="150" height="150" /></a>' . "\n"; ....
Thanks in advance for any help,
DanaHi Chris,
I tried the new code and it works perfectly. Thank you so much.
I have another question related to the code above, but I figured I should create a new thread for it, which I’ll do now.
Thanks,
DanaForum: Plugins
In reply to: [Related YouTube Videos] results based on post title and meta_valueWorked perfectly! Thanks again ??
Forum: Plugins
In reply to: [Related YouTube Videos] results based on post title and meta_valueThanks 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. keyword3I 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.
Forum: Plugins
In reply to: [WPMovieLibrary] movie date in titleWorked perfectly. Thanks again ??
Forum: Plugins
In reply to: [WPMovieLibrary] movie date in titleThanks, I’m temped to play around with the code as I normally do to figure out how to add the parentheses around the year.
I’m assuming the edit would be on line 25, but I don’t want to hit and miss until I get it right, since I would be making bulk edits to the database and I don’t want to mess anything up.
I used the second script *https://gist.github.com/CaerCam/8ea93d1f97c4999f1bc1) to reverse the titles back to normal.
I would like to wrap the parentheses around the year, so if you have time to tell me what I should edit in the code at (https://gist.github.com/CaerCam/fab579c61eecb8d32d88) to acheive (YYYY), I’d be very grateful.
You’ve already exceeded my expectations. Thanks
Forum: Plugins
In reply to: [WPMovieLibrary] movie date in titleThanks a million ?? That did the trick as I wanted. I would have preferred the dates to be like (YYYY) with parenthesis, as opposed to yyyy. But, I am elated with this solution. Thanks again for your wonderful contribution.
Forum: Plugins
In reply to: [WPMovieLibrary] movie date in titleThanks very much ?? That did the trick, but it still behaves as a pseudo meta title, in that any plugin or code that reads the title picks up the title without the date included. Again I do appreciate your time and help.
My next attempt at a solution, is just to find some way to attach the date to the titles in bulk, meaning the date is actually in the title.
My first attempt was removing the follwing code:
// Don’t do this in admin
if ( is_admin() )
return $title;This place the dates in the titles on the admin side. I got excited thinking I could bulk update the posts status at once (published>draft, draft>published) and the dates would really become part of the title, but that didnt work.
Is there a way to get the code added to the functions to allow me to bulk update all posts, so that they include the date in their titles?
Thanks again for everything.
Forum: Plugins
In reply to: [WPMovieLibrary] movie date in titleBTW I tried updating a post and refreshing a number of times, but code at https://gist.github.com/CaerCam/969881392675790a5332 still didn’t work.
Forum: Plugins
In reply to: [WPMovieLibrary] movie date in titleRegarding “movie date in title”, I added the code to my themes functions as instructed at https://gist.github.com/CaerCam/969881392675790a5332, but it didn’t work. I deactivated yeast seo plugin, but that didn’t work either. I’ll keep fiddling with it. Thanks
Forum: Plugins
In reply to: [WPMovieLibrary] movie date in titlethanks for your prompt response. I’m going over to check out the link reference now. Is there a way to access the movies year (release date) on pages other than single post? for example, I want to add the year under the movie post in the loop on the index page. To add a custom field to a movie on the index page, I would add something like this (<?php echo get_post_meta($post->ID, ‘custom_field’, true); ?>)
to no avail, I tried:
(<?php echo get_post_meta($post->ID, ‘release_date’, true); ?>)
(<?php echo get_post_meta($post->ID, ‘movie_date’, true); ?>)
(<?php echo get_post_meta($post->ID, ‘date’, true); ?>)
etc,Thanks in advance. And thanks again for the fast response. I’m going over to check the github link now ??