Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Forum: Hacks
    In reply to: wp_set_post_terms
    Thread Starter welcha4

    (@welcha4)

    I’ve narrowed the problem down to the file where I register my custom taxonomies. I looked in the term_taxonomy table of the database and the taxonomies from my meta boxes were being saved as integers instead of strings which is certainly what caused this problem. However, I deleted from the database all of those taxonomies, terms, tax-term relationships, and any posts that that were associated with this problem and I am still getting that error message. I can no longer register any kind of custom taxonomy without receiving this error message: Catchable fatal error: Object of class stdClass could not be converted to string in /wp-includes/taxonomy.php on line 2569. I can navigate the admin area, but whenever I try to view any page on the front end that uses the loop, I receive this error message. Please help! Thanks.

    To prevent this from creating a new thumbnail every time you edit a post, add the action to draft_to_publish instead of save_post. This will create a thumbnail only on the first time the post is published.

    works great, thanks!

    Justin – I am trying to do this as well but I’m having trouble using your code. I’m a php newbie so do you think you could help explain lines 20 and 43 to me? I understand what preg_match() is supposed to do but I haven’t yet mastered what all the characters mean.

    I seem to be having a problem with youtubeid(). I’ve tested it out a few ways like this:

    echo youtubeid('https://www.youtube.com/watch?v=UcUmGzciPfo');

    or

    $url = 'https://www.youtube.com/watch?v=UcUmGzciPfo';
    $ytid = youtubeid($url);
    echo $ytid;

    Both ways are not echoing anything. Any help would be appreciated. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)