problem with php function error

When $ticket_details[‘assigned_to’]->display_name is not set, get_user_by() has returned not an object but FALSE. First test if you got an object: $user = get_user_by(‘id’, get_post_meta( $post_id, ‘_responsible’, true)); if ( ! is_object( $user ) ) return; $ticket_details[‘assigned_to’] = $user; display_name is always set if there is an user object. At least to an empty string.

Adding Custom JQuery Menu Fresh Slide Out

In addition to @Wyck’s answer, since you asked if you are doing anything wrong, I’d suggest that it is usually more correct to register and enqueue your scripts as you’ve already done with some scripts in my_custom_function, than it is to write scripts directly into the header. That is, put this code: $(function() { $(‘#menu … Read more

How to edit homepage in WordPress?

If it really is the header you want to edit, you can find its source here: /wp-content/themes/Wallbase/header.php Depending on A) what it is exactly that you want to customize, and B) how your theme is set up and what options it comes with, you might want to try the Theme Options, which can be found … Read more

How to insert a variable into a query parameter?

Errr, are you talking about this: $variable = get_field(‘loop_category’); $args = array( ‘category_name’ => $variable, ); $catquery = new WP_Query($args); while ($catquery->have_posts()) { $catquery->the_post(); // Do your thing } If so, this is basic PHP and has nothing to do with WordPress – even though this is used in its context.