Fake Single WordPress Post (Page) Loop

How about something like this instead: add_action(‘template_redirect’, function(){ get_header(); echo ‘page stuff’; get_footer(); exit(); }); add_filter(‘the_title’, function(){ return “Virtual Page Title”; }); What you are trying to do strikes me as very prone to error. Different themes can do all kinds of different things with page.php, not to mention that it may not be present … Read more

Category archive in menu

WordPress has actions and filter to be used to add elements on menu admin, and so it’s possible to write a plugin that put on the menu admin screen the month/year archives. However, that plugin should consist in some dozen lines of code, and once you have not tried to write anyhing, if this was … Read more

Duplicate use of WordPress plugin

This is a very generic answer but you can’t just rename the plugin, you are also going to have to alter the add_menu_page and add_submenu_page registration code starting around line 48 and going to about line 81. You need to change at least the $menu_slug and $parent_slug, but probably want to change $page_title and $menu_title … Read more

Embed YouTube, login to buy & payment methods

From Woocommerce docs: WooCommerce includes options to allow guest checkout, meaning customers do not need an account to make a purchase; Paypal standard merchant functionality permits people to use credit or debit card instead of a paypal account. WooCommerce is based on custom post types, and uses the standard editor field, so embedding a youtube … 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

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

how to change/remove/hide menu under installed plugins

Solution using Codes To hide a menu from a plugin menu, you need to look for the plugin hook. And after finding the hook, remove_submenu_page() will help you to achieve the desired task done. Using the hook and the remove_submenu_page(), you can remove the submenu exactly from that plugin. For a complete understanding of the … Read more