• Resolved vandejen

    (@vandejen)


    Hello,

    I wanted to use your plugin to display movie information in every post I do. I give the name of my post the exact name as the movie I am writing about so I put the php:

    <?php
    $imdb_movie_id_or_title = the_title();
    $movie = get_imdb_connector_movie(“$imdb_movie_id_or_title”);
    echo $movie[“title”] . ” Released:” . $movie[“year”] . ” Genre:” . $movie[“genre”] . ” Length:”. $movie[“runtime”];
    ?>

    Into my loop and the title is the only information that seems to show. So it seems I am having trouble connecting to imdb. Is there anything else you need to have in the php file to get this to connect? Ive downloaded the plugging and made sure that everything is on, and it shows up in my widgets but I wanted the information directly in my posts.

    I am a wordpress beginner so I am sorry if this question has an obvious answer. Thank you!

    https://www.ads-software.com/plugins/imdb-connector/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author thaikolja

    (@thaikolja)

    Hi vandejen,

    thanks a lot for reporting this issue. I’ve changed a few lines of code so you have to update the newest version from your WordPress Dashboard > Plugins and click “Update” and wait for it to be completed.

    After that, I suggest to empty the cache, either via the plugin settings page found in the Dashboard under Settings > IMDb Connector or by simply deleting the cache folder found in /wp-content/plugins/imdb-connector/.

    I’ve also attached an example code that works almost the same way as yours. I’ve tested it in the WordPress theme Twenty Twelve, and it worked finde. Here’s a screenshot of how it looks like.

    The example code can be found on pastebin.com/Cf1ZjHLc#.

    Please remember: This example has to be used if you’re inside of the loop. If you’re outside the loop, you’ll have to provide a post ID. The only thing you’ll have to do is enter the post ID of the post you want the movie details from inside the function get_the_title(); on line 3 in the posted pastebin code. It could look like this:

    <?php
       /** Get the movie title of a post title whose ID is 53 */
       $movie_title = get_the_title(53);

    I hope this will solve your problem. If not, please let me know here in this thread.

    Thread Starter vandejen

    (@vandejen)

    Thank you so much! It works perfectly!

    Plugin Author thaikolja

    (@thaikolja)

    I’m glad to hear that. If you’re happy with my plugin, please consider giving something back by taking two minutes to write a short review and rate my plugin. It’d be much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘php connector not working’ is closed to new replies.