Title: Justyna Ratajczak's Replies | WordPress.org

---

# Justyna Ratajczak

  [  ](https://wordpress.org/support/users/jusi/)

 *   [Profile](https://wordpress.org/support/users/jusi/)
 *   [Topics Started](https://wordpress.org/support/users/jusi/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jusi/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jusi/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jusi/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jusi/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jusi/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/users/jusi/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/jusi/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Thumbnails] Black areas on thumbnails](https://wordpress.org/support/topic/black-areas-on-thumbnails/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/black-areas-on-thumbnails/#post-9357181)
 * Just tested it – adding `$imagick->setImageAlphaChannel(self::ALPHACHANNEL_DEACTIVATE);`
   to the function caused “HTTP error” when uploading the PDF into WordPress, and
   didn’t generate a thumbnail at all. Used it like this:
 *     ```
       add_action('pdf_thumbnails_generate_image_blob', function ($blob, $filename) {
   
           $imagick = new Imagick();
           $imagick->readImage($filename);
           $imagick->setImageAlphaChannel(self::ALPHACHANNEL_DEACTIVATE);
           $imagick->setIteratorIndex(0);
           $imagick->setImageFormat('jpg');
           return $imagick->getImageBlob();
   
       }, 10, 2);
       ```
   
 * Also tried setting `$imagick->setImageAlphaChannel(11);` as per the answer you
   linked – no HTTP error but still black areas on the generated thumbnails.
    -  This reply was modified 8 years, 9 months ago by [Justyna Ratajczak](https://wordpress.org/support/users/jusi/).
      Reason: extra testing
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Show Future Posts in Date Order](https://wordpress.org/support/topic/show-future-posts-in-date-order/)
 *  [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/show-future-posts-in-date-order/#post-2729943)
 * Hi Adam,
 * Have you been able to fix this issue? I’m having the same problem with listing
   future posts in the correct order – using `orderby` and `order` doesn’t work 
   for me either. Using WP 3.4.1
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-PageNavi] [Plugin: WP-PageNavi] wp-pagenavi throws error 404](https://wordpress.org/support/topic/plugin-wp-pagenavi-wp-pagenavi-throws-error-404/)
 *  [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-pagenavi-wp-pagenavi-throws-error-404/#post-2762254)
 * Hi Scribu, thanks for your reply!
 * I use my code (above) in a custom page template (which is why I’m using `get_query_var('
   page')`). Think a portfolio page that I’m trying to display my Work CPT posts
   on.
 * EDIT: I changed my code a bit with an exact copy/paste from your article I mentioned
   above:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   The maximum number of lines of code that you can post in these forums is **ten
   lines**. Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * but that doesn’t work either. I’m not sure I should be using `get_query_var('
   page')` or `get_query_var('paged')`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-PageNavi] [Plugin: WP-PageNavi] wp-pagenavi throws error 404](https://wordpress.org/support/topic/plugin-wp-pagenavi-wp-pagenavi-throws-error-404/)
 *  [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-pagenavi-wp-pagenavi-throws-error-404/#post-2762252)
 * Same problem here, my code:
 *     ```
       <?php $paged = (get_query_var('page')) ? get_query_var('page') : 1; ?>
       <?php $work_items = new WP_Query(array( 'post_type' => 'work', 'posts_per_page' => '12', 'paged' => $paged ) ); ?>
       <?php while ($work_items->have_posts() ) : $work_items->the_post(); ?>
   
       <div class="col2 work-item">
           <a href="<?php the_permalink(); ?>">
               <img src="<?php the_field('work_overview_thumbnail'); ?>" alt="" />
               <p class="descr"><?php the_field('work_overview_description'); ?> <span><?php the_field('work_client_name'); ?></span></p>
           </a>
       </div>
   
       <?php endwhile; ?>
   
       <?php wp_pagenavi(array( 'query' => $work_items )); ?>
       ```
   
 * Using `get_query_var('page')` cause it’s a custom page template as explained 
   in [this article](http://scribu.net/wordpress/wp-pagenavi/right-way-to-use-query_posts.html).
   Using `get_query_var('paged')` doesn’t work either.
 * My permalink structure is just /%postname%/
 * Has anyone managed to fix this problem?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Content Blocks (Custom Post Widget)] [Plugin: Custom Post Widget] Content Type re-assigning to Post on edit](https://wordpress.org/support/topic/plugin-custom-post-widget-content-type-re-assigning-to-post-on-edit/)
 *  [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-custom-post-widget-content-type-re-assigning-to-post-on-edit/#post-2576369)
 * Hi Johan,
 * I’m having a problem related to what **fireproofsocks** posted.
 * After dragging the widget into active area the whole form in the widget disappears,
   except Delete/Close/Save buttons. They come back after the widget has been saved.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Google-loaded jQuery doesn't work in wp-admin](https://wordpress.org/support/topic/google-loaded-jquery-doesnt-work-in-wp-admin/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/google-loaded-jquery-doesnt-work-in-wp-admin/#post-1875874)
 * I can’t make it to work with custom scripts in my theme. I register my scripts
   in functions.php, like this:
 *     ```
       wp_register_script('selectivizr', get_bloginfo('template_directory').'/_assets/js/selectivizr.js', 'jquery');
       wp_enqueue_script('selectivizr');
       ```
   
 * to have them included in `wp_head`. Then I use `wp_enqueue_script("jquery");`
   in my header.php BEFORE the `wp_head` but the jQuery is STILL loaded after my
   scripts anyway.
 * Registering Google-hosted version of jQuery forced it to load before my registered
   scripts to make them work properly. However it made the draggable menu items 
   in Appearance/Menus to stop working. Removing the `if(!is_admin())` condition
   fixes the menu problem, but the dashboard items don’t slide down then (there 
   is no jQuery on the page at all).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Category RSS link](https://wordpress.org/support/topic/category-rss-link/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/category-rss-link/#post-1604897)
 * From what I understand, this function displays the category in the feed, not 
   on the page. It doesn’t return any value.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[WP 3.0 RC] Recent comments code snippet?](https://wordpress.org/support/topic/wp-30-rc-recent-comments-code-snippet/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/wp-30-rc-recent-comments-code-snippet/#post-1526442)
 * Anyone?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to make a template for child categories?](https://wordpress.org/support/topic/how-to-make-a-template-for-child-categories/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/how-to-make-a-template-for-child-categories/#post-1488654)
 * Looks great, thanks.
 * However, I have an issue. What I want to achieve is template with a layout (different
   from the rest of the archives) for these child categories.
 * Using the plugin and, in my example, category-5.php to achieve the same layout
   for all child categories, I get the same effect on each of them: the loop seems
   to return all posts in category 5.
 * What I need to have is category 6 page to display only category 6 posts etc.
 * The current `query_posts` in the template files looks as follows:
 * `query_posts( 'paged=$page&post_per_page=-1&cat=' . get_query_var('cat') );`
 * I assume WordPress takes the 5 ID from the filename, how should I change the `
   query_posts` call to achieve the effect I need?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: WP-PageNavi] PageNavi getting confused with URLs?](https://wordpress.org/support/topic/plugin-wp-pagenavi-pagenavi-getting-confused-with-urls/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/plugin-wp-pagenavi-pagenavi-getting-confused-with-urls/#post-1482557)
 * Loops are in different files:
 * homepage.php: [http://tinypaste.com/7217d](http://tinypaste.com/7217d) – the 
   actual homepage template
    index.php: [http://tinypaste.com/3f32e](http://tinypaste.com/3f32e)
   page.php: [http://tinypaste.com/8d206](http://tinypaste.com/8d206) – posting 
   in case it can be relevant to the problem.
 * EDIT: I think it’s worth mentioning that the archives for both categories and
   tags paginate correctly as well:
    [http://dev.gentlecode.net/cssshow/wordpress/tag/colors/page/2](http://dev.gentlecode.net/cssshow/wordpress/tag/colors/page/2)
   [http://dev.gentlecode.net/cssshow/wordpress/category/designer/page/2](http://dev.gentlecode.net/cssshow/wordpress/category/designer/page/2)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: WP-PageNavi] PageNavi getting confused with URLs?](https://wordpress.org/support/topic/plugin-wp-pagenavi-pagenavi-getting-confused-with-urls/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/plugin-wp-pagenavi-pagenavi-getting-confused-with-urls/#post-1482486)
 * > You can achieve the same thing using `query_posts()` and `wp_reset_query()`.
 * That’s the problem. It doesn’t work with `query_posts()`. It gets really confused.
   This method was the only one that worked for me.
 * > Well, in that case, make sure the correct loop is executed on _/wordpress/page/
   > 2_. You can add a line like this: `echo "in the home loop";`.
 * I think it’s pretty obvious that it doesn’t execute the correct loop on _/wordpress/
   page/2_. Otherwise, it wouldn’t display posts from a category that is **excluded**
   in that query.
 * The whole point of this thread is me trying to figure out **why** it doesn’t 
   execute the correct loop. I reset the query after both loops, everything works
   great (PageNavi correctly renders 5 links for 5 pages of posts) just not the 
   actual links in the homepage pagination.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: WP-PageNavi] PageNavi getting confused with URLs?](https://wordpress.org/support/topic/plugin-wp-pagenavi-pagenavi-getting-confused-with-urls/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/plugin-wp-pagenavi-pagenavi-getting-confused-with-urls/#post-1482430)
 * The `$wp-query` stuff comes from the fact that PageNavi doesn’t really work with
   custom queries, as explained here: [http://www.wplover.com/756/how-to-get-custom-wp_query-loop-working-with-pagination-and-wp-pagenavi](http://www.wplover.com/756/how-to-get-custom-wp_query-loop-working-with-pagination-and-wp-pagenavi)
 * Using this tutorial was the only way I managed to even get PageNavi to display
   correctly.
 * Thing is, as explained, homepage and blog page use two different loops. So I 
   would expect Page 2 of “blog” loop (_/wordpress/blog/page/2_) to display blog
   posts – which happens, all good.
 * However, homepage has a different loop, so I would expect Page 2 of “homepage”
   loop (_/wordpress/page/2_ to display only homepage posts.
 * Here’s the link to live example: [http://dev.gentlecode.net/cssshow/wordpress/](http://dev.gentlecode.net/cssshow/wordpress/)
 * Homepage displays all posts EXCEPT blog category. Blog page displays ONLY posts
   in blog category.
 * EDIT: It’s worth mentioning that PageNavi correctly renders the pagination on
   the homepage (it’s set to show only one posts per page for testing purposes) –
   there are 5 posts and it correctly displays 5 pages. It just seems to get confused
   with the URLs.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Excluding latest post from the Loop](https://wordpress.org/support/topic/excluding-latest-post-from-the-loop/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/excluding-latest-post-from-the-loop/#post-1199523)
 * Thank you, got it working now.
 * Justine
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Conditional tag for post “age”?](https://wordpress.org/support/topic/conditional-tag-for-post-age/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/conditional-tag-for-post-age/#post-1098346)
 * Thank you very much!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Displaying name of current page in query_posts?](https://wordpress.org/support/topic/displaying-name-of-current-page-in-query_posts/)
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/displaying-name-of-current-page-in-query_posts/#post-1090421)
 * Thanks for all the help, Stvwlf. Here’s the final code I used – it works great:
 *     ```
       <?php
          $pageslug = $post->post_name; // name of the page (slug)
          $catslug = get_category_by_slug($pageslug); // get category of the same slug
          $catid = $catslug->term_id;  // get id of this category
          $query= 'cat=' . $catid. '';
          query_posts($query); // run the query
       ?>
       ```
   

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/users/jusi/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/jusi/replies/page/2/?output_format=md)