WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content Type Manager
[resolved] Issue After Upgrade to 0.9.6.1--paging links no longer hyperli (8 posts)

  1. new_B
    Member
    Posted 1 year ago #

    Hi,

    Thanks for the awesome plugin.

    I have a custom template that spits out a list (summary view) of custom posts. It includes a call to get_pagination_links().

    => After upgrading this plugin, the pagination is no longer hyperlinked (i.e., just the page numbers are appearing). Also the styling is broken.

    I have disabled the Summarize Posts plugin as it's now in CCTM. Is there any upgrade step I am missing to make pagination work again?

    It would be helpful to include upgrade steps required for future release in the readme.txt file as things broke due to functions getting deleted, changed, etc. in the updates.

    http://wordpress.org/extend/plugins/custom-content-type-manager/

  2. new_B
    Member
    Posted 1 year ago #

    Any suggestions for solving this? Thanks in advance.

  3. fireproofsocks
    Member
    Plugin Author

    Posted 1 year ago #

    How are you using pagination? Paste your code here. SummarizePosts is included in CCTM.

    There is a page in the wiki on how to use the CCTM_Pagination class with several examples: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/CCTM_Pagination

    If there's a bug with something in the class, then please file it in the bug tracker: I'm unable to frequently monitor the forums.

  4. new_B
    Member
    Posted 1 year ago #

    Thanks.

    The following are parts of the code

    $cat = get_term_by('name', $catname, 'category');
     $args = array();
     $args['taxonomy'] = 'category';
     $args['taxonomy_slug'] = $cat->slug;
     $args['limit'] = get_option('posts_per_page');
     $args['paginate'] = true;
     $args['orderby'] = 'post_title';
     $args['order'] = 'ASC';
     $args['exclude'] = $wp_query->post->ID;
     $Q = new GetPostsQuery($args);
     $Q->set_output_type(ARRAY_A);
     $results = $Q->get_posts($args);

    ...
    print $Q->get_pagination_links();

    => The page numbers are no longer hyperlinked. It looks like the following

    -----------------------------------
    1 2 3 Next > Last >>
    Page 1 of 3
    -----------------------------------

  5. fireproofsocks
    Member
    Plugin Author

    Posted 1 year ago #

    It's more helpful to post the HTML of the output, not just what it looks like.

    I think you just need to change the formatting templates used on the pagination output. Again, see examples on the wiki: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/CCTM_Pagination specifically those at the bottom that show how to customize the output -- there should be usable defaults in place, but you can override them or set them verbosely to see if that alters the behavior.

    Note that this is no longer a valid function:

    $Q->set_output_type(ARRAY_A);

    It became too problematic to support both types of output formats internally in the class so it was removed several versions ago.

  6. new_B
    Member
    Posted 1 year ago #

    Thanks.

    The HTML code generated is

    <div id="pagination">&nbsp;<span class="post_selector_pagination_active_page">1</span>&nbsp;&nbsp;<span class="linklike" title="2" onclick="javascript:change_page(2);">2</span>&nbsp;&nbsp;<span class="linklike" title="3" onclick="javascript:change_page(3);">3</span>&nbsp;&nbsp;<span class="linklike" onclick="javascript:change_page(2);">Next &rsaquo;</span>&nbsp;<span class="linklike" onclick="javascript:change_page(3);" >Last &raquo;</span><br/>
    				Page 1 of 3

    When you say that the following is no longer a valid function. What has/should it be replaced by?

    $Q->set_output_type(ARRAY_A);

    Also, would it mean customizing the TPLs for the pages to become hyperlinked again with the current version of your plugin?

    Thanks again.

  7. fireproofsocks
    Member
    Plugin Author

    Posted 1 year ago #

    You can delete that one line: output is always an array. For example, see the wiki page I referenced above -- that's why it's there.

  8. new_B
    Member
    Posted 1 year ago #

    Thanks. Just an update--the issue may have been a bug. Updating the plugin to the latest version made the pages hyperlinked again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic