Modifying My Account Page
-
I am having some difficulty modifying the my account page and hoping someone could send me in the right direction.
Ideally What I would like to do is run a query that gathers some products and their meta data to display in the my account page. I have easily done this on other pages but have failed to accomplish this on the my account page. Here is what I have so far.
$args = array( 'tax_query' => array(array('taxonomy' => 'product_type' , 'field' => 'slug', 'terms' => 'auction')), 'posts_per_page' => 4, ); $loop = new WP_Query( $args ); if ( $loop->have_posts() ) {
This is looping the posts and displaying them, but when I use the variable $product while looping WP_Query it will not display anything.
For example on my other page templates I use<?php echo $product->get_image() ?>
And the product image appears with no problem. However using this same code in the My Accounts page displays nothing.Any help would be greatly appreciated, I feel the problem could be that the var $product is not accessible through the my Account Page but I am not sure why.
- The topic ‘Modifying My Account Page’ is closed to new replies.