get comment data using comment id
I am sorry for wasting your time I think there is a simple function that can do this: <?php $defaults = $comment_id; $com= get_comment($defaults ); ?>
I am sorry for wasting your time I think there is a simple function that can do this: <?php $defaults = $comment_id; $com= get_comment($defaults ); ?>
The function get_terms has a convenient $args parameter which allows you to customize your query to meet your needs; in your case, it would be something as simple as: $args = array( ‘exclude’ => array(1,2,3) ); $terms = get_terms(“testimonial_category”, $args); The array to exclude must contain the category ids of the categories you wish to … Read more
First off, the usual caveat — Don’t modify core code. (Certainly not on a production site.) If you read the documentation on the Codex, you’ll notice that most if not all of the pages in, say, the Function Reference have a section called Source File. Clicking the link located there will take you to the … Read more
Looks like it is your if statement possibly. It’s kind of tricky to say “if it’s not this or if it’s not that, then I want this to happen”. Normally you have to negate and change the operator. Try <?php if (!is_home() && !is_front_page()) { ?> This says “I want this to run on every … Read more
Change this: else if ($widget[“image_from”] == “custom”) { $post_custom_id = get_post_meta($row->post_id, $widget[“image_custom”], true); $row->image = get_bloginfo(‘url’).”/scripts/timthumb.php?src=”https://wordpress.stackexchange.com/questions/106998/.get_bloginfo(“url’).”/wp-content/uploads/”.get_post_meta($post_custom_id,”_wp_attached_file”,true).”&h=70&w=55&zc=1″; } To this: } else if ( ‘custom’ == $widget[‘image_from’] ) { $post_custom_id = get_post_meta( $row->post_id, $widget[‘image_custom’], true ); if ( get_post_meta( $post_custom_id, ‘_wp_attached_file’, true ) ) $row->image = get_bloginfo(‘url’) . ‘/scripts/timthumb.php?src=”https://wordpress.stackexchange.com/questions/106998/. get_bloginfo(“url’) . ‘/wp-content/uploads/’ . get_post_meta( $post_custom_id, ‘_wp_attached_file’, … Read more
First of all… It’s a really poor quality code, I guess. You assume that there will be only one tabs widget on page (it’s recognized by HTML id param, so placing 2 widgets on same page would generate invalid HTML code). You also implement only one shortcode, which parses it’s content. But I don’t think … Read more
I think japanworm do not want it on the frontpage, the code above let’s it display only on the frontpage. You can exclude something (if not) by putting an ! before the tag. What you want to say is: If it isn’t front page than display the form So it would actually be <?php if( … Read more
You are creating a string …. $sql=””ft_num”=>””.$ticket[‘number’].'”,”booking_id”=>”‘.$ticket[‘booking’].'”‘; … but expecting it to operate as an array… array( $sql, ‘event_id’ => $event[‘id’], This has nothing to do with how WordPress does anything. This is pure PHP. You have literally created this: array( [] => “ft_num”=>”‘.$ticket[‘number’].'”,”booking_id”=>”‘.$ticket[‘booking’].'”, ‘event_id’ => $event[‘id’], You need to build the array dynamically. $dynargs … Read more
Couple points: The customize_register action hook actually passes your function the $wp_customize variable, you don’t need to declare it as the global. Just put it as the first argument in your function declaration. The reason your code doesn’t run on the front end of the site is that the customize_register action hook only runs when … Read more
The Misconception get_site_url() retrieves the site_url option from the database, as set under General Settings in the administrative backend / wp-admin. If this is indeed the exact same wordpress installation it will always return the same thing, regardless of whether the location is reachable via one, two or five hundred domains. You might want to … Read more