ericwied
Forum Replies Created
-
Ok so im not sure if its the current updates of the new events manager plugin fixed the problem or not, but after installing custom post type ui I did exactly as you said and made a post type named “portafolio”, I then checked on the status of my regular custom post type of portfolio, and it turns out they now work.
To ensure the plugin was the reason for the post types working I deactivated the cpt ui plugin and the original post types are still working.
I am not sure if it was you guys marcus that made the post types working or if CPT UI somehow miraculously fixed some stuff after installing to fix all the post types again or not but it worked and I am happy.
Although, I do need to mention that my theme and the problem i had if not being solved miraculously by itself after an installation of CPT, CPT would not solve my problem.
Because my theme has built in hooks and information in the custom post type “portfolio” that it uses in the theme to make the intended result work, just a bit of info for you guys developing this plugin to think about.
Finally after thanking you for your help marcus, I would like to make a suggestion to the plugin not related to this issue,
In allowing the cancelation of bookings it would extremely beneficial if we can set the amount of time a user/guest has to cancel their booking, before the start of the event.
IE customers can only cancel their booking if it is 12 hours before the start time of the event.
So in recap CPT has “solved” my problem but not in the way it was intended to per your suggestion and other past use cases. At least not with my theme, as of now I don’t have the cpt plugin activated and my post types still work.
Thanks again for your help Marcus
Eric
I specifically found this in my functions.php relating to the custom post types and calling them. Maybe you see a discrepancy or conflict with the plugin here.
/*-- Get page content (Used for pages with custom post types) --*/ if(!function_exists('getPageContent')) { function getPageContent($pageId) { if(!is_numeric($pageId)) { return; } global $wpdb; $sql_query = 'SELECT DISTINCT * FROM ' . $wpdb->posts . ' WHERE ' . $wpdb->posts . '.ID=' . $pageId; $posts = $wpdb->get_results($sql_query); if(!empty($posts)) { foreach($posts as $post) { return nl2br($post->post_content); } } } } /* -- Get page ID by Custom Field Value -- */ function get_page_ID_by_custom_field_value($custom_field, $value) { global $wpdb; $page_ID = $wpdb->get_var(" SELECT wposts.ID FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = '$custom_field' AND (wpostmeta.meta_value like '$value,%' OR wpostmeta.meta_value like '%,$value,%' OR wpostmeta.meta_value like '%,$value' OR wpostmeta.meta_value = '$value') AND wposts.post_status = 'publish' AND wposts.post_type = 'page' LIMIT 0, 1"); return $page_ID; } /*******************************************/
Also Note based on the confusion of the conversation that was had above that Events manager works fully, and that it is effecting my theme is the issue I am also researching the init possibility.
Nope it didn’t change a thing
Ok so since I have access to the theme files and can copy the ones that you need to deduce the problem i am going to past them here for you to see and try and find the solution to the problem.
Here it goes
single.php
<?php /** * The Template for displaying all single posts. */ get_header(); ?> <?php $al_options = get_option('al_general_settings'); ?> <div class="box"> <!-- Title --> <div class="headertext"> <?php the_title() ?> <?php $headline = get_post_meta($post->ID, "_headline", $single = false);?> <?php if(!empty($headline[0]) ):?> <span><?php echo $headline[0] ?></span> <?php endif?> </div> <div class="clearsmall"></div> <div class="container_12"> <?php if($al_options['al_fullwidth_single'] == '1'): ?> <div class="grid_9"> <?php else: ?> <div class="grid_12"> <?php endif ?> <?php $postcounter = 1; $attachedImages = array(); while ( have_posts() ) : the_post(); $argsThumb = array( 'order' => 'ASC', 'post_type' => 'attachment', 'post_parent' => $post->ID, 'post_mime_type' => 'image', 'post_status' => null, 'exclude' => get_post_thumbnail_id() ); $video = get_post_custom_values("_post_video"); $type = get_post_custom_values("_post_listing_type"); if ($type) $type = $type[0]; $full_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false); ?> <!--Blog Post--> <article <?php post_class('blogpost'); ?> id="post-<?php the_ID();?>"> <?php if ($type == 3): ?> <div class="hover_video"> <a href="https://vimeo.com/<?php echo $video[0]?>?width=800&height=450" data-rel="prettyPhoto[blogvideo<?php the_ID();?>]" title="<?php the_title()?>"> <?php the_post_thumbnail('blog-list2', array('class'=>'')); ?> </a> </div> <?php elseif($type==2):?> <div class="hover_slideshow"> <a href="<?php echo $full_image[0]; ?>" title="<?php the_title()?>" data-rel="prettyPhoto[blog<?php the_ID();?>]"> <?php the_post_thumbnail('blog-list2', array('class'=>'')); ?> </a> <?php $attachments = get_posts($argsThumb); if ($attachments) { foreach ($attachments as $attachment) { //echo apply_filters('the_title', $attachment->post_title); echo '<a href="'.wp_get_attachment_url($attachment->ID, 'thumbnail', false, false).'" data-rel="prettyPhoto[blog'.$post->ID.']" title="'.get_the_title($post->ID).'"></a>'; } } ?> </div> <?php else: ?> <div class="hover_link"> <a href="<?php the_permalink() ?>" title="<?php the_title()?>"> <?php the_post_thumbnail('blog-list2', array('class'=>'')); ?> </a> </div> <?php endif ?> <div class="blog_box"> <div class="grid_2"> <!-- Show Date --> <?php if($al_options['al_blog_show_date']): ?> <h4><?php the_time('M jS, Y'); ?></h4> <?php endif ?> <div class="dividerslim"></div> <?php if($al_options['al_blog_show_author']): ?> <h6 class="post-author"> <?php printf( __( 'Author: %1$s', 'Balance' ), '<span class="color">'.get_the_author().'</span>') ?> </h6> <?php endif?> <!-- Show Comments amount --> <?php if( 'open' == $post->comment_status && $al_options['al_blog_show_comments']) : ?> <h6 class="single-comments"> <?php _e('Comments: ', 'Balance') ?> <?php comments_popup_link('0', '1', '%'); ?> </h6> <?php endif; ?> <!-- Show Categories --> <?php if($al_options['al_blog_show_cats']): ?> <h6> <?php if ( count( get_the_category() ) ) : ?> <?php $category = get_the_category(); if($category[0]):?> <?php _e('Category: ', 'Balance') ?><a href="<?php echo get_category_link($category[0]->term_id )?>" class="color"><?php echo $category[0]->cat_name?></a> <?php endif?> <?php endif; ?> </h6> <?php endif?> <div class="dividerslim"></div> </div> <div class="grid_6"> <h4> <a href="<?php the_permalink(); ?>" class="post-title"><?php the_title()?></a> </h4> <?php the_content() ?> </div> <div class="clearsmall"></div> <div class="dividerslim"></div> <?php $tags_list = get_the_tag_list( '', '' ); if ( $tags_list ) : ?> <div class="tagcloud single-cloud">Tags: <?php printf( __( '%s', 'Balance' ), $tags_list ); ?></div> <?php endif; ?> <div class="clearsmall"></div> </div> <!--End Blog Post--> </article> <div class="clear"></div> <?php $postcounter++; endwhile; // End the loop. Whew. ?> <?php comments_template( '', true ); ?> <?php $test = false; if ($test) {comment_form(); wp_link_pages( $args );} ?> <div class="clearsmall"></div> </div> <?php if($al_options['al_fullwidth_single'] == '1'): ?> <aside class="grid_3 sidebarright alignright"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Global Sidebar") ) : ?> <?php endif;?> </aside> <?php endif?> <div class="clearfix"></div> </div> <?php get_footer(); ?> </div>
single-portfolio.php
<?php /** * Portfolio Single Posts template. */ get_header(); ?> <?php $al_options = get_option('al_general_settings'); ?> <!-- Title --> <div class="box"> <!-- Title --> <div class="headertext"> <?php the_title() ?> <?php $headline = get_post_meta($post->ID, "_headline", $single = false);?> <?php if(!empty($headline[0]) ):?> <span><?php echo $headline[0] ?></span> <?php endif?> </div> <div class="clearsmall"></div> <div class="container_12"> <div class="grid_12_no_margin"> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php the_content(); ?> <?php endwhile ?> <?php //comments_template( '', true ); ?> <!--<div class="clear"></div>--> </div> <div class="clearnospacing"></div> </div> <?php get_footer(); ?> </div>
These are pieces that are being effected. not so much the Single.php as i have fixed the little error. But the single-portfolio.php won’t even who the page and i get a 404.
Please help that would amazing.
Hi I am receiving the same problem with my current theme
It is for reference here.
balance.weblusive.comWhen I create a portfolio item (custom post type)
and I proceed to click the portfolio item expecting to be transferred to the portfolio item information page, I get a 404 error.Note: I had a previous problem with Events manager and just regular posts where the footer was getting thrown above the main content of the site.
I fixed this by cutting and pasting the get footer request above the last ending </div> tag. in the single.php file.
If events manager is turned off the previous problem with footer moving up was not in effect. ( I know that it was in fact the theme designer being sloopy with this problem, so i fixed it for my self) The same result of everything working fine, happens for portfolio items as well when events manager is de activated.
What I have not done to remedy this problem is create a single-event.php page because i don’t believe that will effect the problem.
I have tried both pages and posts in the settings as well as with out formatting and with formatting.
I am going to try the dev version you suggested Marcus and see if the problem has been resolved.
Brb