Title: ValeSauer's Replies | WordPress.org

---

# ValeSauer

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

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

 Search replies:

## Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets] How export and import PODS custom field images?](https://wordpress.org/support/topic/how-export-and-import-pods-custom-field-images/)
 *  Thread Starter [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/how-export-and-import-pods-custom-field-images/#post-17188052)
 * My code above does not work properly. Unfortunately I cannot delete the post 
   any more. Use this working code instead:
 *     ```wp-block-code
       <?php
       function my_saved_post($post_id, $xml_node, $is_update)
       {
   
           define('IMPORT_ID', 1);
           define('FIELD_NAME', 'product_image');
   
           $import_id = wp_all_import_get_import_id();
           if ($import_id == IMPORT_ID) {
               $pod = pods('product', $post_id);
               if (!empty($pod)) {
                   $post_image_id = get_post_meta($post_id, FIELD_NAME, true);
                   $data = array(
                       'product_image' => $post_image_id
                   );
                   $pod->save($data);
               }
           }
       }
       add_action('pmxi_saved_post', 'my_saved_post', 10, 3);
       ```
   
    -  This reply was modified 2 years, 6 months ago by [ValeSauer](https://wordpress.org/support/users/valesauer/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets] How export and import PODS custom field images?](https://wordpress.org/support/topic/how-export-and-import-pods-custom-field-images/)
 *  Thread Starter [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/how-export-and-import-pods-custom-field-images/#post-17187548)
 * Instead of using an outdated third party plugin just for this simple case you
   can also add this function to your imports. It will manage the necessary relations
   between the POD post and its image relation.
 * You have to replace the IMPORT_ID, the POD_ID and the FIELD_NAME with yours. 
   It will only work for one image field.
 *     ```wp-block-code
       <?php
       function manage_pods_image_relations($post_id, $xml_node, $is_update)
       {
   
           global $wpdb;
   
           define('IMPORT_ID', 1);
           define('POD_ID', 2368);
           define('FIELD_NAME', 'my_image_field');
           define('TABLE_PODSREL', $wpdb->prefix . 'podsrel');
   
           $import_id = wp_all_import_get_import_id();
           if ($import_id == IMPORT_ID) {
               $post = get_post($post_id);
               if (!empty($post)) {
                   $pods_field = null;
                   if ($pods_fields = get_posts(array(
                       'name' => FIELD_NAME,
                       'post_type' => '_pods_field',
                       'post_status' => 'publish',
                       'posts_per_page' => 1
                   ))) $pods_field = $pods_fields[0];
                   if (!is_null($pods_field)) {
                       $post_image_id = get_post_meta($post->ID, FIELD_NAME, true);
                       $podsrel_id = $wpdb->get_var($wpdb->prepare("SELECT id FROM %s WHERE pod_id = %d AND field_id = %d AND item_id = %d", TABLE_PODSREL, POD_ID, $pods_field->ID, $post->ID));
                       if (!empty($post_image_id) && empty($podsrel_id)) {
                           $wpdb->insert(TABLE_PODSREL, array(
                               'pod_id' => POD_ID,
                               'field_id' => $pods_field->ID,
                               'item_id' => $post->ID,
                               'related_item_id' => $post_image_id
                           ));
                       } elseif (!empty($post_image_id) && !empty($podsrel_id)) {
                           $wpdb->update(TABLE_PODSREL, array(
                               'related_item_id' => $post_image_id
                           ), array(
                               'id' => $podsrel_id
                           ));
                       } elseif (empty($post_image_id) && !empty($podsrel_id)) {
                           $wpdb->query(
                               $wpdb->prepare("DELETE FROM %s WHERE id = %d", TABLE_PODSREL, $podsrel_id)
                           );
                       }
                   }
               }
           }
       }
       add_action('pmxi_saved_post', 'manage_pods_image_relations', 10, 3);
       ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets] How export and import PODS custom field images?](https://wordpress.org/support/topic/how-export-and-import-pods-custom-field-images/)
 *  Thread Starter [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/how-export-and-import-pods-custom-field-images/#post-17178987)
 * I have the commercial version of both WPAllImport and WPAllExport.
 * However even when I imported image filenames or URLs to these fields they did
   not show up. What is the format I need to use to import images to PODS custom
   image fields?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Toolset Types - Custom Post Types, Custom Fields and Taxonomies] Update to 1.6.4 causing error](https://wordpress.org/support/topic/update-to-164-causing-error/)
 *  [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/update-to-164-causing-error/#post-5526438)
 * For me Marcins fix worked fine.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-PageNavi] Once Again: Page not found on second and further pages](https://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages/)
 *  Thread Starter [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [13 years ago](https://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages/#post-3544877)
 * To get Childcategories too, I had to change it to
 *     ```
       function my_post_queries( $query ) {
       	// do not alter the query on wp-admin pages and only alter it if it's the main query
       	if (!is_admin() && $query->is_main_query()){
   
       		// alter the query for the home and category pages
       		if(is_home()){
       			$query->set('posts_per_page', 5);
       		}
   
       		if(is_category()){
       			$query->set('posts_per_page', 5);
   
       			$args = array(
       					'child_of' => 38
       					);
       			$childcats = get_categories( $args );
       			foreach ($childcats as $childcat){
       				if(cat_is_ancestor_of( 38, $childcat->term_id )){
       					$query->set('post_type', 'bericht');
       				}
       			}
   
       			if(is_category(38)){
       				$query->set('post_type', 'bericht');
       			}
   
       			$args = array(
       					'child_of' => 2
       			);
       			$childcats= get_categories( $args );
       			foreach ($childcats as $childcat){
       				if(cat_is_ancestor_of( 2, $childcat->term_id )){
       					$query->set('post_type', 'bericht');
       				}
       			}		
   
       			if(is_category(2)){
       				$query->set('post_type', 'topo');
       			}
       		}
       	}
       }
       add_action( 'pre_get_posts', 'my_post_queries' );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-PageNavi] Once Again: Page not found on second and further pages](https://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages/)
 *  Thread Starter [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [13 years ago](https://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages/#post-3544876)
 * Okay this is crazy. I simply was not deep enough in Custom Post Types and especially
   not in the right Use of wp_query.
 * I read these to posts:
    [http://wordpress.stackexchange.com/questions/50761/when-to-use-wp-query-query-posts-and-pre-get-posts](http://wordpress.stackexchange.com/questions/50761/when-to-use-wp-query-query-posts-and-pre-get-posts)
   [http://codex.wordpress.org/Function_Reference/query_posts](http://codex.wordpress.org/Function_Reference/query_posts)
 * These made me:
    1. completely remove wp_query from my category/archive page, 
   as it is allready there by the global Query 2. Change all secondary querys (for
   example links in the footer, similar posts and so on) to $posts = new WP_Query(
   $args) 3. copy all my args in the pre_get_posts function
 * _[ Moderator Note: [Please post code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)
   or markup snippets between backticks or use the code button. ]_
 *     ```
       function my_post_queries( $query ) {
       	// do not alter the query on wp-admin pages and only alter it if it's the main query
       	if (!is_admin() && $query->is_main_query()){
   
       		// alter the query for the home and category pages
       		if(is_home()){
       			$query->set('posts_per_page', 5);
       		}
   
       		if(is_category(38)){
       			$query->set('post_type', 'bericht');
       			$query->set('cat', 38);
       			$query->set('posts_per_page', 5);
       		}
       		if(is_category(2)){
       			$query->set('post_type', 'topo');
       			$query->set('cat', 2);
       			$query->set('posts_per_page', 5);
       		}		
   
       	}
       }
       add_action( 'pre_get_posts', 'my_post_queries' );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-PageNavi] Once Again: Page not found on second and further pages](https://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages/)
 *  Thread Starter [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [13 years ago](https://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages/#post-3544875)
 * Thats interesting. I found out, that pagination works, if I create as many ordinary
   posts as i have custom posts.
 * If i have 5 posts per page and
    6 topos (my custom post type) 5 normal posts 
   Pagination does not work
 * If i have
    6 topos 6 normal posts i get page 2.
 * And so on.. this works with further pages to..anyone an idea?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-PageNavi] Once Again: Page not found on second and further pages](https://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages/)
 *  Thread Starter [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [13 years ago](https://wordpress.org/support/topic/one-again-page-not-found-on-second-and-further-pages/#post-3544870)
 * Thanks, romancretnik, that was not a solution for me.
 * I don’t know why, but after trying, editing, and saving the slugs of both the
   categories and custom post types it worked.
    Now that I went live with the page
   the pagination fell back to its old behaviour and gives back “not found” errors.
 * I went through dozens of wordpress forums and stuff, tried so many codes and “
   fixes”, but none made it for me…
 * Is there a way to debug the query? I allready tried it with SAVEQUERIES true,
   but I couldn’t find an answer in the queries..
 * here, once again, the page which is live know, WITH this silly bug…
    [http://www.walter-hoelzler.de/tourenberichte/page/2/](http://www.walter-hoelzler.de/tourenberichte/page/2/)
   [http://www.walter-hoelzler.de/tourenberichte/](http://www.walter-hoelzler.de/tourenberichte/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Yoast SEO - Advanced SEO with real-time guidance and built-in AI] [Plugin: WordPress SEO by Yoast] %%name%% isn't replaced by author name](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-name-isnt-replaced-by-author-name/)
 *  [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-name-isnt-replaced-by-author-name/#post-3103577)
 * same %%category%% issue.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Yoast SEO - Advanced SEO with real-time guidance and built-in AI] [Plugin: WordPress SEO by Yoast] Category and Tags Don't work anymore](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-category-and-tags-dont-work-anymore/)
 *  [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-category-and-tags-dont-work-anymore/page/3/#post-2861581)
 * Thanks PalPanlini,
 * that made it for mue:
 * > Go to SEO => Permalinks (no change needed) and submit the form. it resolve 
   > the issue.
   > but, i fa change any thing from admin part, such as posting new post, i am 
   > started getting this error. then i will submit the Permalinks page, then it
   > resolves the error.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Add / edit button links with Tiny MCE not working](https://wordpress.org/support/topic/add-edit-button-links-with-tiny-mce-not-working/)
 *  [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/add-edit-button-links-with-tiny-mce-not-working/#post-2091682)
 * Hey Bluantinoo, did that work for you? I have the same problem and I also think
   it must be kind of a jquery-incombatility… If it worked, which files did you 
   update or change?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [c.wpdialog is not a function](https://wordpress.org/support/topic/cwpdialog-is-not-a-function/)
 *  [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/cwpdialog-is-not-a-function/#post-2002925)
 * Anyone found a solution? I found a workaround using TinyMCE Advanced, but its
   a bad option as you can’t use internal linking with the plugin activated.
 * Must be some kind of a jquery incompatibility…
 * If noone will find a solution we could only wait for a new WP-Release…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Don’t cache pages for known users – doesnt work](https://wordpress.org/support/topic/dont-cache-pages-for-known-users-doesnt-work/)
 *  Thread Starter [ValeSauer](https://wordpress.org/support/users/valesauer/)
 * (@valesauer)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/dont-cache-pages-for-known-users-doesnt-work/#post-2137274)
 * Okay thanks, a already activated the debug system yesterday on level 5, so I 
   can give you exactly the debugging-info of the requests above:
 * _**Login as Admin:**
    07:25:19 / Cookie detected: wordpress\_logged\_in\_07c0f1ba5b8f3cefca9baf2c9c972020
   07:25:19 / supercache dir: /berbeoov/www.bergzeitblog.de/blog/wp-content/cache/
   supercache/blog.bergzeit.de/ 07:25:19 / Cookie detected: wordpress\_logged\_in\
   _07c0f1ba5b8f3cefca9baf2c9c972020 07:25:19 / No wp-cache file exists. Must generate
   a new one. 07:25:19 / Cookie detected: wordpress\_logged\_in\_07c0f1ba5b8f3cefca9baf2c9c972020
   07:25:19 / In WP Cache Phase 2 07:25:19 / Setting up WordPress actions 07:25:
   19 / Created output buffer 07:25:19 / Cookie detected: wordpress\_logged\_in\
   _07c0f1ba5b8f3cefca9baf2c9c972020 07:25:27 / Output buffer callback 07:25:27 /
   Cookie detected: wordpress\_logged\_in\_07c0f1ba5b8f3cefca9baf2c9c972020 07:25:
   27 / Gzipping buffer. 07:25:27 / Writing gzipped buffer to wp-cache cache file.
   07:25:27 / Renamed temp wp-cache file to /berbeoov/www.bergzeitblog.de/blog/wp-
   content/cache/wp-cache-4774001cfc26fb74ef45d13ce1603c66.html 07:25:27 / Writing
   gzip content headers. Sending buffer to browser 07:25:27 / wp\_cache\_shutdown\
   _callback: collecting meta data. 07:25:27 / Writing meta file: /berbeoov/www.
   bergzeitblog.de/blog/wp-content/cache/meta/wp-cache-4774001cfc26fb74ef45d13ce1603c66.
   meta
 * **After Logout Unknown User again:**
    07:25:49 / supercache dir: /berbeoov/www.
   bergzeitblog.de/blog/wp-content/cache/supercache/blog.bergzeit.de/ 07:25:49 /
   Served page from supercache file using PHP.
 * For me it looks like the plugin simply doesn’t accept, that I don’t want it to
   reload the page for users with cookies. Am I right?
 * The 10 seconds loading time obviously occur during generating the content in 
   the output_buffer.

Viewing 13 replies - 1 through 13 (of 13 total)