illuminateddesigns
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Linking a post type to a parent page?diggy….
Forum: Fixing WordPress
In reply to: Linking a post type to a parent page?and again! ??
bump
Forum: Fixing WordPress
In reply to: Linking a post type to a parent page?Bump
I just realized that this only happens when I disable the ‘editor’ in my Custom Post Type. Anybody know a way around this?
Forum: Plugins
In reply to: Change the names of the WordPress Statuses?And once more for good measure… ??
Forum: Plugins
In reply to: Change the names of the WordPress Statuses?Bumpity bumpskins
And nevermind once more…this page explains it:
https://codex.www.ads-software.com/Function_Reference/get_post_meta
So if that is set to ‘true’, it only tries to return one single variable, yet if it is not set or set to ‘false’, it returns an array. So my setting it to ‘true’ when there was an array of files to be retrieved, caused the error.
This is fun.
This is interesting…when I removed the ‘true’ from the above code snippet, everything works great.
Why is that? What does that value represent within the code and furthermore, why did it prevent it from working?
Forum: Plugins
In reply to: [Plugin: Custom Field Template] how do i display the image or file?I’d also like to know how to get multiple images to display…
Forum: Plugins
In reply to: [Custom Field Template] [Plugin: Custom Field Template] Php Codes?This post below also might help you even further:
Forum: Plugins
In reply to: [Custom Field Template] [Plugin: Custom Field Template] Php Codes?Absolutely….
This link should explain it all:
https://www.kevinleary.net/advanced-content-management-wordpress-custom-field-templates/
The key is to register the function in the functions.php and then simply call each custom field through the “getCustomField” php code.
Hope this is what you were looking for!
Also, if I simply remove the “endforeach”, I get:
Warning: Invalid argument supplied for foreach()
Forum: Fixing WordPress
In reply to: New post notifications when using Custom Post Types (WP 3.0)I feel it has something to do with this section of the plugin. For some reason, it does not recognize the custom post types within the $post variable…or so that’s my uneducated guess!
/** Sends an email notification of a new post */ function publish($post = 0, $preview = '') { if ( !$post ) { return $post; } if ( $preview == '' ) { // we aren't sending a Preview to the current user so carry out checks $s2mail = get_post_meta($post->ID, 's2mail', true); if ( (isset($_POST['s2_meta_field']) && $_POST['s2_meta_field'] == 'no') || strtolower(trim($s2mail)) == 'no' ) { return $post; } // are we doing daily digests? If so, don't send anything now if ( $this->subscribe2_options['email_freq'] != 'never' ) { return $post; } // is the current post a page // and should this not generate a notification email? if ( $this->subscribe2_options['pages'] == 'no' && $post->post_type == 'page' ) { return $post; } // is this post set in the future? if ( $post->post_date > current_time('mysql') ) { // bail out return $post; } //Are we sending notifications for password protected posts? if ( $this->subscribe2_options['password'] == "no" && $post->post_password != '' ) { return $post; } $post_cats = wp_get_post_categories($post->ID); $check = false; // is the current post assigned to any categories // which should not generate a notification email? foreach ( explode(',', $this->subscribe2_options['exclude']) as $cat ) { if ( in_array($cat, $post_cats) ) { $check = true; } } if ( $check ) { // hang on -- can registered users subscribe to // excluded categories? if ( '0' == $this->subscribe2_options['reg_override'] ) { // nope? okay, let's leave return $post; } } // Are we sending notifications for Private posts? // Action is added if we are, but double check option and post status if ( $this->subscribe2_options['private'] == "yes" && $post->post_status == 'private' ) { // don't send notification to public users $check = true; } // lets collect our subscribers if ( !$check ) { // if this post is assigned to an excluded // category, or is a private post then // don't send public subscribers a notification $public = $this->get_public(); } $post_cats_string = implode(',', $post_cats); $registered = $this->get_registered("cats=$post_cats_string"); // do we have subscribers? if ( empty($public) && empty($registered) ) { // if not, no sense doing anything else return $post; } }
Forum: Fixing WordPress
In reply to: Subscribers Not Receiving New Post NotificationsI should also mention that I am attempting to use a custom post type with a subscribed category. For some reason this does not work. Do you know what I might need to change within the plugin or within my functions.php to get subscribe2 to recognize new posts from within a custom post type?