WPDragon
Forum Replies Created
-
So, I re-actived the plugin (site still didnt work) and said too many redirects…so, I went into the plugin settings and ‘disabled’ the ‘Configure to use SSL’ — and now the site works again, and everything is showing the pages are secured with ‘HTTPS’ even the login page.
Any what could have been the cause?
Thank you for the quick reply…Ya, I had updated the Easy FancyBox plugin because it originally said it was “compatible” with my version of WordPress – which was 4.4.7 — however, I just upgraded WP to the latest 4.9.5 version…and now it fixed the error.
Forum: Plugins
In reply to: [Custom Post Type UI] Category pagination not working in Custom Post Type…?Oh okay, thanks!..I removed
'nav_menu_item'from the array, and everything still works!Thanks again.
- This reply was modified 9 years, 8 months ago by WPDragon.
Forum: Plugins
In reply to: [Custom Post Type UI] Category pagination not working in Custom Post Type…?Awesome!…it worked!…I added the code you suggested to the top of the filtering.
function themeprefix_show_cpt_archives( $query ) { if ( is_admin() || ! $query->is_main_query() ) { return; } if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { $query->set( 'post_type', array( 'post', 'nav_menu_item', 'games' )); return $query; } } add_filter( 'pre_get_posts', 'themeprefix_show_cpt_archives' );Thanks for your help & quick reply.
- This reply was modified 9 years, 8 months ago by WPDragon.
Forum: Plugins
In reply to: [Custom Post Type UI] Category pagination not working in Custom Post Type…?Hi..just a quick update on this situation…The good news is, it seems everything is now working w/ pagination on the category page for my Custom Post Type using the code below in the functions.php:
function themeprefix_show_cpt_archives( $query ) { if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { $query->set( 'post_type', array( 'post', 'nav_menu_item', 'games' )); return $query; } } add_filter( 'pre_get_posts', 'themeprefix_show_cpt_archives' );However, one minor thing I notice is that with the use of ‘nav_menu_item‘ – it seems to automatically add its own recent post that goes to a “page not found” (for example: sitename.com/9469)..
When i remove ‘nav_menu_item‘ then that new created post disappears the list (which is good)…however, without ‘nav_menu_item‘ then the category page for the CPT does not display a main Navigation Menu at the top…so, it seems ‘nav_menu_item‘ is necessary to show the main navigation…but, how can I use it without it creating its own recent post?
Hopefully that makes some sense….
thanks.
Forum: Fixing WordPress
In reply to: Pagination Not Working on Custom Category Template Pageplease post the code of those edits.
Below is the part of the code I used to show results for the ‘custom post type’:
<!-- Page Content ================================================== --> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $postsperpage = get_option('posts_per_page'); query_posts( array( 'ignore_sticky_posts' => 1, 'posts_per_page' => $postsperpage, 'paged' => $paged, 'cat' => $cur_cat_id, 'orderby'=> 'title', 'order' => 'ASC', 'category_name' => 'atari', 'post_type' => 'games' ) ); ?>Below is the Pagination code that the original category.php was using:
<!-- Pagination ================================================== --> <div class="pagination"> <?php global $wp_query; $big = 999999999; // need an unlikely integer echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages ) ); ?> <div class="clear"></div>Forum: Plugins
In reply to: [Custom Post Type UI] Category pagination not working in Custom Post Type…?Thanks for the reply…Actually, i’m using a custom category template for the CPT…For example, category-NES.php — (NES is the category name that I am using for the CPT called ‘Games’)
I do get proper results showing on the category page for the CPT — however, it doesn’t show pagination (similar to other category pages).
Am i suppose to use the archive instead?…The ‘category’ that im using is part of the custom post type I created..
Sorry, im a bit confused… :/
- This reply was modified 9 years, 8 months ago by WPDragon.
Forum: Fixing WordPress
In reply to: Pagination Not Working on Custom Category Template Pageohh…well, I meant that I created a copy of the original and called it for example: category-films.php …However, I made edits to specify the post_type & category_name..
The results show the posts…its just the pagination at the bottom doesn’t appear for some reason.
Forum: Plugins
In reply to: [Custom Post Type UI] Changing Custom Post Type Structure…please help.oh okay, great. Thanks for all your help & quick replies.
Forum: Plugins
In reply to: [Custom Post Type UI] Changing Custom Post Type Structure…please help.oh okay, ya that make sense…so, as far as using the rewrite_slug, I assume then this option would be a solid long-term solution, right?
So, one quick last thing…after I do the rewrite_slug will I also need to do a ‘redirect’ for my existing 75 posts that I published to avoid broken pages that were indexed by Google, correct?
Forum: Plugins
In reply to: [Custom Post Type UI] Changing Custom Post Type Structure…please help.I tested the ‘Custom Rewrite_slug’ and it worked to replace ‘apps’ to ‘games’…which is a good thing.
Also, regarding customizing the permalinks for custom post types…I found a plugin that seems to work fairly well & has some positive reviews…
I just have one other question regarding the ‘Custom Rewrite_slug’ vs. changing the post type slug…I noticed a checkbox that says ‘Migrate posts to newly renamed post type?’..hmm?
Would you say the custom rewrite_slug a better solution in this case, rather than actually changing and migrating it?
Forum: Plugins
In reply to: [Custom Post Type UI] Changing Custom Post Type Structure…please help.okay cool..I will test that out.
I just have a couple of more questions:
What about for adding the relationship to the URL structure…for example: after ‘games’ i want to label the specific gaming console for that particular content.
- /games —> atari/
- /games —> nintendo/
Sorry, im not too familiar with the exact terminology to describe it. 🙂
I appreciate your help with this.
Forum: Plugins
In reply to: [Custom Post Type UI] Changing Custom Post Type Structure…please help.Thanks for the quick reply….so, just to make sure I understand the process correctly for the existing 75 posts:
Within the Custom Post Type UI plugin:
- Go to the ‘Edit Post Type’ tab (created for ‘apps’).
- Scroll down to the ‘Custom Rewrite_slug’ field.
- Then, type in ‘games’
- SAVE
Then, go to the wordpress settings – ‘Permalinks’ and just re-save the page?
Oh, okay..Thanks again for your help!
Perfect!…I followed your detailed instructions and it looks like it worked out great!…Thank you for all your help & fast responses through this process – i really appreciate it! 🙂
As for iTSec 5.5.0 — im actually still on wordpress 4.4.3…is this version of iTSec considered compatible & stable enough on it?