Show a Category Specific Info Box

There are multiple ways to print content on the front end. The “best” way depends on the details of the project and your description is very superficial. The option I can think of are: Just edit the appropriate theme template to use has_category to display your links to the category URLs Do the same as … Read more

Wishlist Content

In order for you to show your content for both levels you should need to mark the content protection level to be valid for those two levels. For example a post the can be seen by level 1 and level 2 should be marked by those 2 levels. Also you member the that need to … Read more

Make custom post type column sortable

I believe the missing piece to your puzzle is one additional filter to perform the sort and return the sorted data. Try something like the following: function sort_column_by_auction_1357( $vars ){ if ( isset( $vars[“orderby”] ) && “auction” == $vars[“orderby”] ) { $vars = array_merge( $vars, array( “orderby” => “auction” ) ); } return $vars; } … Read more

how to debug shipping module / class

Yes, add this function to your module function my_print_r( $msg, $name=”” ) { $error_dir=”/path/to/wordpress/wp-content/debug.log”; $msg = print_r( $msg, true ); $log = $name . ” | ” . $msg . “\n”; error_log( $log, 3, $error_dir ); } And call my_print_r( $variable_to_inspect, ‘description’ );. The file debug.log is originally used by WP_DEBUG_LOG, and if you don’t … Read more

Fallback if statement based on the number filtered from it

Got some help from a friend and figured out that I needed to move the post_meta stuff into the query with meta_query then just set a fallback from there. <?php $current_date = date(‘Ymd’); $page_object = get_queried_object(); $page_id = get_queried_object_id(); // Match the string “123” to the database value a:1:{i:0;s:3:”123″;} (serialized array) for ACF $page_id = … Read more