Support » Plugin: Custom Content Type Manager » Implementing pagination

  • Hi
    I used CCTM to create a new post type, but I am having problems with pagination.
    Here is my code :

        //Fix homepage pagination
        if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } else if ( get_query_var('page') ) {$paged = get_query_var('page'); } else {$paged = 1; }
        $temp = $wp_query;  // re-sets query
        $wp_query = null;   // re-sets query
        $args = array('post_type' => 'Track', 'orderby'=>'date', 'order'=>'DESC', 'posts_per_page' => 1, 'paged' => $paged);
        $wp_query = new WP_Query();
        $wp_query->query( $args );
        while ($wp_query->have_posts()) : $wp_query->the_post();
    <div class="post-inner pad-10"><div class="zChenarPost">
    <div class="zPinkTop">
    <div class="zArtistTop"><?php $my_array = get_custom_field('trackArtist:to_array');$artistString = implode(" , ", $my_array);print $artistString?></div>
    <div class="zTrackNameTop"><?php print_custom_field('trackName'); ?></div>
    <div class="zPostSpacer"></div>
    <div class="zTrackInfoTags"><?php print_custom_field('trackReleaseDate'); ?></div>
    <div class="zTrackInfoTags"><?php print_custom_field('trackLabel'); ?></div>
    <div class="zTrackInfoTags"><?php print_custom_field('trackCountry'); ?></div>
    <div class="zTrackInfoTags"><?php print_custom_field('trackBPM'); ?> BPM</div>
    <div class="zTrackInfoTags"><?php print_custom_field('trackLength'); ?></div>
    <div class="zTrackInfoTags"><?php $my_array = get_custom_field('trackGenre:to_array');foreach ($my_array as $item) { print $item; }?></div>
    <div class="zPostSpacer"></div>
    <?php $trackLinkX = get_custom_field('trackLink'); ?>
    <?php $trackImageX = get_custom_field('trackAvatar'); ?>
    <?php echo '<img class="zPlayerImage" src="'.$trackImageX.'">';?>
    <?php echo '<div link="'.$trackLinkX.'" class="zPlayerContainer" id="player'.get_the_id().'">'; ?>
            <div class="zPlayerSeek">
            <div class="zPlayerSeekBar"></div>
            <div class="zPlayerStartTime">00:00</div>
            <div class="zPlayerEndTime">00:00</div>
            <img class="zPlayerPlayBtn" src="img/playBtn.png"></img>
            <img class="zPlayerPauseBtn" src="img/pauseBtn.png"></img>
    <?php	 endwhile;?>
    <?php if(function_exists('wp_paginate')) {
    } ?>

    However when I click on the generated links, it gives me a 404.

    My website is, you can see for yourself.
    For some reason if I go directly to, it works..

Viewing 1 replies (of 1 total)
  • Plugin Contributor fireproofsocks


    Sounds like an issue with your .htaccess or permalink settings.

    Posting your link like that is generally not useful, by the way. There’s no guarantee that what a reader is looking at is what you were looking at when you posted the link.

Viewing 1 replies (of 1 total)
  • The topic ‘Implementing pagination’ is closed to new replies.