How to Pass Current Taxonomy Terms into new WP_Query?

Try this: add_action( ‘genesis_loop’, ‘bds_more_projects_query’ ); function bds_more_projects_query() { if ( is_singular( ‘portfolio’ ) ) { $categories = get_the_terms( $post->ID, ‘portfolio_category’ ); $cat_ids = array(); foreach ( $categories as $category ) { $cat_ids[] = $category->term_id; } $args = array( ‘post_type’ => ‘portfolio’, ‘posts_per_page’ => 4, ‘tax_query’ => array( array( ‘taxonomy’ => ‘portfolio_category’, ‘field’ => ‘id’, … Read more

How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?

You can do this very easily using the_post_navigation. The WordPress reference page for it has more information. the_post_navigation( array( ‘prev_text’=>__(‘Previous: %title’), ‘next_text’=>__(‘Next: %title’), )); That said, if you do want to continue using `wp_link_pages’ then, again, its WordPress resource is your friend, explaining the parameters and how to change them. Hope that helps!

Use PHP code in Menu Admin Section

Allan, thanks for clarifying the question. You can’t add PHP in the wp-admin menu manager. Instead, here is a way to keep the menu dynamic and managed in wp-admin, while still allowing you to add your PHP at the end: <?php $args = array( ‘menu’ => ‘your-menu-name’, ‘container’ => ”, ‘items_wrap’ => ‘%3$s’ ); ?> … Read more

403 Forbidden Localhost Wamp Apache Php

Somethings wrong with your permission setting. Login to your server via SSH. You can login using your terminal. I’ve created a blog about how to connect to your server via SSH if you’re using windows. Run the following commands: chown www-data:www-data -R * # Let Apache be owner find . -type d -exec chmod 755 … Read more

media_handle_upload fails with gravity form submitted image

That error is very probabbly due to incorrect loading of the required files from wp-admin; note how in your code those files are loaded only when a scpecific input has data (input_13) but not in every case you need those files. You do this: if( !empty($_FILES[‘input_13’][‘name’])) { require_once(ABSPATH . ‘wp-admin/includes/file.php’); require_once(ABSPATH . ‘wp-admin/includes/image.php’); // …. … Read more