How to override parent theme function through the child theme [closed]

I just downloaded the theme to check it out, and header-extensions.php is not loaded as a template: /** Load Structure */ require_once (AMBITION_STRUCTURE_DIR . ‘/header-extensions.php’); So you wouldn’t be able to override the file in that manner. I’m not sure exactly what you are trying to do, but it looks like ambition_headercontent_details method is in … Read more

Order custom posts by a date metabox

When you’re saving the data on your custom post type you need to set it so that the meta box value is actually stored as a UNIX timestamp, eg: if(!isset($_POST[“event_informations_date”])) { return $post; } else { $event_as_timestamp = strtotime ( $_POST[“event_informations_date”]; update_post_meta($post->ID, “event_informations_date”, $event_as_timestamp ); } This way you will have an orderable value for … Read more

Meta Query “IN” doesn’t work with ACF checkbox filter

Checkbox field is stored as serialized array, therefore you can not use the IN operator and array with the values you are looking for. To get posts with checked “melbourne”, change meta_query to: $meta_query = array( array( ‘key’ => $name, ‘value’ => ‘”melbourne”‘, ‘compare’ => ‘LIKE’, ) ); To get posts with melbourne or sydney: … Read more

Custom post types – RSS lastBuildDate issue

This is the solution I found based off of @Rarst’s answer. Put this in the themes functions.php and it worked like a charm! add_filter(‘get_lastpostmodified’, ‘my_lastpostmodified’); function my_lastpostmodified() { global $wpdb; $add_seconds_server = date(‘Z’); return $wpdb->get_var(“SELECT DATE_ADD(post_modified_gmt, INTERVAL ‘$add_seconds_server’ SECOND) FROM $wpdb->posts WHERE post_status=”publish” ORDER BY post_modified_gmt DESC LIMIT 1″); }

How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page

The current screen doesn’t appear to be set when that filter is run, so you cannot use that. Also, the $post actually refers to the attachment, not the post – so we can’t get the post typ fro that either…. So looking at the source code: http://core.trac.wordpress.org/browser/tags/3.3.2/wp-admin/includes/media.php The filter you are using is called by … Read more

Creating multiple page URL without creating the pages in WordPress

This is a simple outline so don’t use this in production but it’s a working example. Define your template and place it in templates/template-portfolio-template.php inside your theme. <?php /* * Template Name: Portfolio Template * Description: Page template to display portfolio custom post types */ echo ‘This is the Portfolio Template!’; Next, you’ll need to … Read more