Tag Info

New answers tagged

0

Try this with or without the return. $object_terms = wp_get_object_terms($GLOBALS['post']->ID, 'staff', array('fields' => 'all')); if ($object_terms) { echo '<p>' . '' . '' ; $res = ''; foreach ($object_terms as $term) { $res .= '<a href="' . esc_attr(get_term_link($term, $taxonomy)) . '" title="' . ...


1

Simple solution, use get_template_part(). For example: get_template_part( 'partials/footer' ); Which would get the footer.php inside the partials/ directory. Another example: get_template_part( 'partials/footer', 'home' ); Which would get the footer-home.php inside the partials/ directory. One more example: get_template_part( ...


1

Use a date_query to get the 30 posts older than the current one. EXAMPLE (NOTE: The following is untested and requires Wordpress 3.7+ and PHP 5.4+) $current_post = get_queried_object(); $args = [ // Your arguments to pass, add as needed 'posts_per_page' => 30, 'date_query' => [ [ 'before' => strtotime( ...


0

I have this post and the response from David Chu to thank for enlightening me. There is nothing patently 'wrong' with the way that I implemented this. The reason that it doesn't work is because of the fact that I have both the Genesis Simple Sidebars plugin and the Genesis Woocommerce Connect plugin installed. Both of these make use of different Action ...



Top 50 recent answers are included