WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type Maker
[resolved] Integrating with default Categories and tags (9 posts)

  1. nhakeem
    Member
    Posted 1 year ago #

    Hello Jorn,

    I would like to thank you for this powerful plugin.
    The reason I installed your plugin is that I wanted to orgainze posts by creating custom types, and I was glad that it uses the same default categories and tags of wordpress.

    I have the following wordpress Categories: Movies, Series, Documentries...etc.

    I created a custom post called "Example" and created an Example Post, and assign a category called "Movies" in wordpress categories.

    The problem is in the front end, when I go to .../category/movies the archive list shows the regular wordpress posts only. The Example post with category Movies are not showing.

    Thank your in advance for your help!

    http://wordpress.org/extend/plugins/custom-post-type-maker/

  2. Jorn Bakhuys
    Member
    Plugin Author

    Posted 1 year ago #

    Hello nhakeem,

    I have replicated your problem in a local testing setup, so I understand what you mean.

    Just to be clear, so I can explain the best solution for your, what do you want to achieve exactly? From my point of view you want to accomplish one of the following:

    1. You want to display default WordPress Posts and Custom Post Types on the category page
    2. You want to display either default WordPress Posts or Custom Post Types on a certain category page

    If you can explain me what you want to achieve I might be able to give you some guidance.

  3. nhakeem
    Member
    Posted 1 year ago #

    Hello Jorn,

    Thanks for your reply.

    The thing is, my theme settings panel has a homepage drag and drop setup, where I can show the latest posts in each category. But this settings panel only accept default wordpress categories.

    So, It would be perfect to show WordPress Posts and Custom Post Types on the same category page. (No.1).

    Alternatively, showing Custom posts types on a certain (wordpress default) category page may also work.

    Thanks for your help. Much appreciated.

  4. Jorn Bakhuys
    Member
    Plugin Author

    Posted 1 year ago #

    Hello nhakeem,

    So the problem is actually that the theme you are using does not support custom taxonomies.
    Do you have any programming experience? Because in my experience this problem can only be solved by editing files of you theme, and this is not something I can fix for you with the plugin.

    The following page gives you a solution in case you are able to edit your theme files:
    How to display regular posts & custom post types that fall under a category using just the generic category template?

    Making your theme compatible with custom taxonomies (so not only the default WordPress categories) would be the best solution though.

  5. nhakeem
    Member
    Posted 1 year ago #

    Coding is not my thing...

    tried altering category.php file by inserting this code

    // Modify the default loop, include custom post types
    global $wp_query;
    $args = array_merge( $wp_query->query, array( 'post_type' => 'any' ) );
    query_posts( $args );
    
    // The beginning of the loop looks like this:
    while ( have_posts() ) : the_post();

    Here is how the category.php file looks like

    <?php get_header(); ?>
    	<div class="content">
    	<?php tie_breadcrumbs() ?>
    
    		<?php $category_id = get_query_var('cat') ; ?>
    
    		<div class="page-head">
    			<h2 class="page-title">
    				<?php printf( __( 'Category Archives: %s', 'tie' ), '<span>' . single_cat_title( '', false ) . '</span>' );	?>
    			</h2>
    			<?php if( tie_get_option( 'category_rss' ) ): ?>
    
    			<a class="rss-cat-icon ttip" title="<?php _e( 'Feed Subscription', 'tie' ); ?>" href="<?php echo get_category_feed_link($category_id) ?>"><?php _e( 'Feed Subscription', 'tie' ); ?></a>
    			<?php endif; ?>
    			<div class="stripe-line"></div>
    
    			<?php
    			if( tie_get_option( 'category_desc' ) ):
    				$category_description = category_description();
    				if ( ! empty( $category_description ) )
    				echo '<div class="clear"></div><div class="archive-meta">' . $category_description . '</div>';
    			endif;
    			?>
    		</div>
    		<?php tie_include( 'slider-category' ) ?>
    		<?php get_template_part( 'loop', 'category' );	?>
    		<?php if ($wp_query->max_num_pages > 1) tie_pagenavi(); ?>
    
    	</div> <!-- .content -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I will try with the theme developer as well.

    Thanks

  6. Jorn Bakhuys
    Member
    Plugin Author

    Posted 1 year ago #

    It is difficult for me to give you suggestions based on a few snippets of code.
    Let me know if editting it with the theme developer had worked out for you.

  7. radongrafix
    Member
    Posted 1 year ago #

    Hello Jorn
    First of all thanks for the great plugin it save me a lot of coding
    but one thing i have a problem is creating custom taxonomies. when i create custom taxonomies it only creates tag taxonomies. my questions is how i can create custom categories

    Thanks
    Ruel

  8. Jorn Bakhuys
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Ruel,

    Try setting Hierarchical to "True" and it will create the list like categories.

  9. radongrafix
    Member
    Posted 1 year ago #

    Thanks Jorn

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic