Title: Hisham's Replies | WordPress.org

---

# Hisham

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Custom post type auto assign specific category](https://wordpress.org/support/topic/custom-post-type-auto-assign-specific-category/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/custom-post-type-auto-assign-specific-category/#post-17348360)
 * Thank You for your help, it is much appreciated.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Custom post category not working](https://wordpress.org/support/topic/custom-post-category-not-working/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/custom-post-category-not-working/#post-17339685)
 * That last bit of code did the trick! Thanks so much for all the help it is very
   much appreciated.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Custom post type auto assign specific category](https://wordpress.org/support/topic/custom-post-type-auto-assign-specific-category/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/custom-post-type-auto-assign-specific-category/#post-17339683)
 * Thanks for all your help, I was able to finally get this to work
 *     ```wp-block-code
       function auto_select_daily_specials_category( $post_ID ) { 
       	$daily_special_cat = get_term_by('slug', 'daily-special', 'category'); 
       	if ( !has_term( 'daily-special', 'category', $post_ID ) ) { 
       		wp_set_post_categories( $post_ID, array( $daily_special_cat->term_id ), true ); 
       	} 
       } add_action( 'save_post', 'auto_select_daily_specials_category' );
       ```
   
 * This code defaults to daily-post when you open a new post. This works perfectly.
 * Thanks for all your help I will mark as solved!
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Custom post type auto assign specific category](https://wordpress.org/support/topic/custom-post-type-auto-assign-specific-category/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/custom-post-type-auto-assign-specific-category/#post-17339052)
 * Pardon my ignorance but this still does not work.
 * When I replace this code :
 *     ```wp-block-code
       function special_add_custom_types( $query ) {
          if( (is_category() || is_tag()) && $query->is_archive() && empty( $query->query_vars['suppress_filters'] ) ) {
             $query->set( 'post_type', array(
              'post', 'specials'
             ));
          }
       }
       add_action( 'pre_get_posts', 'special_add_custom_types' );
       ```
   
 * Wit the code you posted above:
 *     ```wp-block-code
       function special_add_custom_types( $query ) {
          if( (is_category() || is_tag()) && $query->is_archive() && empty( $query->query_vars['suppress_filters'] ) ) {
             $query->set( 'post_type', array(
              'post', 'specials'
             ));
            $taxquery = array(
               array(
                   'taxonomy' => 'daily-special',
                   'field' => 'slug',
                   'terms' => 'daily-special', // array(12, 23)
                   'operator'=> 'IN'
               )
           );
           $query->set( 'tax_query', $taxquery );
          }
       }
       add_action( 'pre_get_posts', 'special_add_custom_types' )
       ```
   
 * It no longer registers my old Special post on the front page and any new special
   posts I make do not end up in the daily-special category?
 * I must be misunderstanding what to do ?
 * Thanks.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Custom post type auto assign specific category](https://wordpress.org/support/topic/custom-post-type-auto-assign-specific-category/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/custom-post-type-auto-assign-specific-category/#post-17338448)
 * Thanks for your response, I am having trouble making this work, here is what 
   I did:
 *     ```wp-block-code
       function special_add_custom_types( $query ) {
          if( (is_category() || is_tag()) && $query->is_archive() && empty( $query->query_vars['suppress_filters'] ) ) {
             $query->set( 'post_type', array(
              'post', 'specials'
             ));
            $taxquery = array(
               array(
                   'taxonomy' => 'category/daily-special',
                   'field' => 'term_id',
                   'terms' => 'daily-special', // array(12, 23)
                   'operator'=> 'IN'
               )
           );
           $query->set( 'tax_query', $taxquery );
          }
       }
       add_action( 'pre_get_posts', 'special_add_custom_types' );
       ```
   
 * Is ‘taxonomy’ => ‘category/daily-special’, not supposed to be category/then the
   category I want, and ‘terms’ => ‘daily-special’ are the two items I set to use
   the category daily-special.
 * Thanks
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Custom post category not working](https://wordpress.org/support/topic/custom-post-category-not-working/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/custom-post-category-not-working/#post-17334119)
 * Ok after some googling around since I knew it was not a Divi specific issue I
   found a bit of code added to the child theme below the custom post code to make
   it all work.
 *     ```wp-block-code
       function special_add_custom_types( $query ) {
          if( (is_category() || is_tag()) && $query->is_archive() && empty( $query->query_vars['suppress_filters'] ) ) {
             $query->set( 'post_type', array(
              'post', 'specials'
             ));
          }
       }
       add_action( 'pre_get_posts', 'special_add_custom_types' );
       ```
   
 * The above together with the top bit of code makes it fully functional!
 * One last question, is it possible to make the post default to checking the category
   daily-specials so the user does not need to check the box?
 * Thanks
    -  This reply was modified 2 years, 5 months ago by [Hisham](https://wordpress.org/support/users/ctrlsync/).
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Custom post category not working](https://wordpress.org/support/topic/custom-post-category-not-working/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/custom-post-category-not-working/#post-17333703)
 * Thanks for your reply.
 * I have tried the above code snipped with no luck. The blog module on the homepage
   is selected to show 1 post (most recent) from the Daily Specials category. The
   test post I made shows in the Specials list with category of Daily Specials.
 * As far as plugins, I have woocomerce, divi tourque lite, wp super cache, and 
   a custom plugin (Ctrl Login) I use to white label the login screen and admin 
   area.
 * I tried creating a test page using default editor to remove Divi from the equation,
   when I use the post list block and set Daily Specials to the category I still
   dont see my test special post that I created. This makes me thing its not being
   registered correctly with WordPress?
 * Thanks.
    -  This reply was modified 2 years, 5 months ago by [Hisham](https://wordpress.org/support/users/ctrlsync/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simply Static - The Static Site Generator] Icons missing](https://wordpress.org/support/topic/icons-missing-22/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/icons-missing-22/#post-17282489)
 * So for anyone dealing with this issue later I messed with this for a while. Just
   adding the wp-content folder to the added URL’s didnt work I needed to add the
   sub folder that goes to the icons for DIVI and that solved my issue.
 * Thanks for your help!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simply Static - The Static Site Generator] Icons missing](https://wordpress.org/support/topic/icons-missing-22/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/icons-missing-22/#post-17269859)
 * So I think I have figured out the issue but I am not sure how to fix it.
 * The non static site is subdomain.domain.com and the static site is domain.com(
   example). The font awesome icons used in Divi builder are located in wp-content/
   themes/Divi/core/admin/fonts/fontawesome/ and they are being copied to domain.
   com. When I inspect the missing icons it is looking for that resource in subdomain.
   domain.com (the non static site).
 * I don’t keep subdomain.domain.com up when I am not making edits or generating
   a new static site. I have done it this way for some time with no issue. Now without
   subdomain.domain.com not up the icons break. If I leave subdomain.domain.com 
   up the icons are not broken. This will work but is not ideal I would rather subdomain.
   domain.com not be up at all so google does not try to index it as this is a rather
   high traffic site and I don’t want the confusion.
 * This only seems to be an issue with font awsome icons no other logos or images/
   content is doing this.
 * Any help is greatly appreciated, thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Duplicator - Backups & Migration Plugin - Cloud Backups, Scheduled Backups, & More] Mysql to MariaDB convert](https://wordpress.org/support/topic/mysql-to-mariadb-convert/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/mysql-to-mariadb-convert/#post-17140657)
 * [@mohammedeisa](https://wordpress.org/support/users/mohammedeisa/) thanks for
   your help. I will try to setup an entirely new server with mysql as mariadb and
   mysql are conflicting packages in the OS that I use for all my servers.
 * Thanks again!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Duplicator - Backups & Migration Plugin - Cloud Backups, Scheduled Backups, & More] Mysql to MariaDB convert](https://wordpress.org/support/topic/mysql-to-mariadb-convert/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/mysql-to-mariadb-convert/#post-17123098)
 * [@mohammedeisa](https://wordpress.org/support/users/mohammedeisa/) thanks so 
   much for your quick response.
 * My situation is I have a server A with a wordpress already running on mariadb
   and I have another wordpress on server B using mysql. I need to put the mysql
   site from serve B onto server A.
 * What is my best bet? Can I convert the SQL dump to be mariadb compatible? Or 
   do I have to run a simultaneous mysql instance on serve A?
 * Any help is much appreciated. Thanks.
    -  This reply was modified 2 years, 8 months ago by [Hisham](https://wordpress.org/support/users/ctrlsync/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simply Static - The Static Site Generator] Genrating from subdomain still shows images at subdomain](https://wordpress.org/support/topic/genrating-from-subdomain-still-shows-images-at-subdomain/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/genrating-from-subdomain-still-shows-images-at-subdomain/#post-16712188)
 * Lazy load is definitely an issue for obvious reasons. But Robo gallery is got
   a bit more going on because not photos show at all.
 * Simply Static is to good to return to a standard WordPress so I am in the process
   of finding a gallery site that can be hosted elsewhere and embedded into my page
   to avoid the whole issue.
 * The other alternative is to leave the dev site up and password protected because
   robo gallery pulls them from the dev site. This is not preferred for me I much
   prefer the security of it being inaccessible unless I am using it real time.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simply Static - The Static Site Generator] Genrating from subdomain still shows images at subdomain](https://wordpress.org/support/topic/genrating-from-subdomain-still-shows-images-at-subdomain/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/genrating-from-subdomain-still-shows-images-at-subdomain/#post-16707857)
 * Some info I want passed along in this thread.
 * I ended up using the standard gallery in Divi (although I am sure the standard
   gallery works the same). What I noticed is that only the photos visible on first
   page of the gallery would show up in the static generation. The rest would be
   broken links. I believe this is due to the way Simply Static views the page it
   does not scroll and trigger the lazy load function or gallery pages themselves.
 * So to fix the gallery issue I had to use the standard gallery module in Divi 
   and set all the photos to be visible on page load (set default amount of photos
   to view larger then or equal to the total number of photos in that gallery).
 * I also ran into another issue which may end up being helpful to someone else 
   reading this. The plugin Autoptomize minifies javascript/css/html and the likes
   making for even faster load times (tested with gtmetrix.com). That being said
   it use a CDN system for photos that hosts them elsewhere but using the domain
   as a key somehow. So this causes the source for the photos to be based on the
   domain you generated from which for me is not the domain my site lives on. If
   you do not turn that feature off you will get some photos showing up in galleries
   and some not with no real rhyme or reason to it. Luckily is a setting that can
   be turned off but it is on by default.
 * Hope this helps someone else along the way. As far as I can tell Robo gallery
   is a no go for simply static.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simply Static - The Static Site Generator] Lates update issue](https://wordpress.org/support/topic/lates-update-issue/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/lates-update-issue/#post-16694098)
 * [@patrickposner](https://wordpress.org/support/users/patrickposner/) worked like
   a charm!
 * Thanks so much
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simply Static - The Static Site Generator] Lates update issue](https://wordpress.org/support/topic/lates-update-issue/)
 *  Thread Starter [Hisham](https://wordpress.org/support/users/ctrlsync/)
 * (@ctrlsync)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/lates-update-issue/#post-16690275)
 * [@patrickposner](https://wordpress.org/support/users/patrickposner/) Thanks for
   your response.
 * Just to clarify your saying upgrade to 2.3.0 and then add that filter to my functions.
   php and see if it solves the issue?
 * (I have a catch all plugin I use for this type of stuff so I can add it there)

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

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