Give Friend Post Management

If you are an admin user, you could just change the author of the post (in the post editor Author box) to that of your friend. Admins already have the power to manage anyone’s post. By changing the name of the author on the post to that of your friend, you both can manage the … Read more

WooCommerce – Complete Order when an action occurs

Remove return; from your code, which is prematurely exiting the function before the following two lines can be executed; that is why the status is not changed. function my_change_status_function () { global $post; $ordernumber = get_post_meta( $post->ID, ‘order_number’, true ); $audit_status = get_post_meta( $post->ID, ‘audit_status’, true ); if ( $audit_status == ‘Complete’ ) { $order … Read more

Where do I insert   to? [closed]

Classes can be added to the ‘li’ tag of each menu item. This field is hidden by default. To show the classes field, navigate to Appearance > Menus. Then click the Screen Options tab at the top the screen. Click the checkbox next to CSS Classes. When specifying class names it is not necessary to … Read more

How to filter homepage posts by popularity? [closed]

First thing we need to do is create a function that will detect post views count and store it as a custom field for each post. To do this, paste the following codes in your theme’s functions.php file function wpb_set_post_views($postID) { $count_key = ‘wpb_post_views_count’; $count = get_post_meta($postID, $count_key, true); if($count==”){ $count = 0; delete_post_meta($postID, $count_key); … Read more

Custom post type / Filter by letter

Assuming that you have a query result, ordered by your titles ASC and wrapped each “block” in a div with the id=”A”, etc.: There’s a PHP function to fill arrays: $aToZ = range( ‘A’, ‘Z’ ); Then you can loop through it: echo ‘<ul class=”aToZ-list”>’; foreach ( $aToZ as $char ) echo “<li class=”aToZ-el”><a href=”#{$char}” … Read more