Conditional tag in Widget Logic for checking if top level page or if subpage

You can find the answer on the plugin’s page at wordpress.org. Select the tab ‘Other Notes’. You will find it at the example list: global $post; // WP page that is a child of page 77 return in_array(77, get_post_ancestors($post)); Edit: As an alternative to your suggestions you may try global $post; return !empty(get_post_ancestors($post)); This is … Read more

“Custom Post Type Permalinks” plugin URL strcuture

I managed to find a way to fix this by toying with my Custom Post Type and Taxonomy registrations. In register_post_type properties: ‘rewrite’ => array( ‘slug’ => ‘classes’ ), In register_taxonomy properties: ‘rewrite’ => array( ‘slug’ => ‘classes’, ‘with_front’=> false ), I now have a clean structure where http://site.com/classes/ points to the post type archive … Read more

showing 2 prices wholesale and normal

Read directly from the database so that no PHP interferes with it. using the postmeta field _price.. <?php echo woocommerce_price( get_post_meta( $product->id, ‘_price’, true ) ) ?>

How to make custom client Login page for a specific page

Here is a great article that explains one solution to do what you are trying to do that I’ve personally used. http://justintadlock.com/archives/2012/10/16/how-i-run-a-membership-site In your case you’ll want to customize the th3_club_member_template function to something like this: add_filter( ‘template_redirect’, ‘nifty_log_in_check’, 99 ); function nifty_log_in_check( $template ) { if ( is_page(‘clients_only’ ) ) && !current_user_can( ‘view_client_content’ ) … Read more

How do I go back to wordpress 3.5

can you restore a backup from your hosting company? it has only been a few days. most hosting companies will do a weekly restore.. if not,. you can’t do a “rollback” per se,. i have done this a few times and i think this is the easiest way. create a subdomain and install the older … Read more