get_terms return errors

As i was mentioning before, it’s a case of your term fetching occuring before the taxonomy has been registered. The init action occurs after the theme’s functions file has been included, so if you’re looking for terms directly in the functions file, you’re doing so before they’ve actually been registered. Here’s a portion of the … Read more

Custom field values in permalink

Here’s how I’d do it. I’m just going to say, I haven’t tested this code at all, so I don’t know if it even works. It’s more of a starting point for you. function jpb_custom_meta_permalink( $link, $post ){ $post_meta = get_post_meta( $post->ID, ‘<insert your meta key here>’, true ); if( empty( $post_meta ) || !is_string( … Read more

Using WordPress functions on other sites

You could simply include the WordPress main file that it loads, wp-load.php or wp-blog-header.php at the very top of your forum’s header file. If I’m correct, that should allow you to use WordPress functions inside your forum theme. Example, at the top of your header, assuming the forum folder is in the root WP folder: … Read more

pagination in woocommerce order history page

I have added pagination in order history page and it is working. Replace below code above loop $customer_orders1 = get_posts(apply_filters(‘woocommerce_my_account_my_orders_query’, array( ‘numberposts’ => -1, ‘meta_key’ => ‘_customer_user’, ‘meta_value’ => get_current_user_id(), ‘post_type’ => wc_get_order_types(‘view-orders’), ‘post_status’ => array_keys(wc_get_order_statuses()) ))); $total_records = count($customer_orders1); $posts_per_page = 20; $total_pages = ceil($total_records / $posts_per_page); $paged = ( get_query_var(‘page’) ) ? get_query_var(‘page’) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)