nick222
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: add_rewrite_rule does not work when .htaccess worksThank for idea, but I did not. My mistake was confusing apache mod_rewrite rules with WP rewrite rules which are based on php regular expressions and internal logic.
Forum: Plugins
In reply to: [Posts in Page] Pagination does not work with custom post typeThanks Eric, I already figured that out. Now I try to make a plugin which could solve that ancient issue without additional options in .htaccess, which I find old and not flexible way. By the way, did you try to make WordPress core’s rewrite rules? There is build in php rewriter but I could not make it work when I used in functions.php, although I attached my rules to the ‘init’ function.
Forum: Plugins
In reply to: [Posts in Page] Pagination does not work with custom post typeWell since that moment I did couple of other things, at first I changed name of post type to ‘pt-news’ with rewrite slug ‘news’ and deleted taxonomy ‘news’ and ‘category’. It worked for a while but then ended up not working. I still do not understand WP rewrite logic. So I had up to correct .htaccess finally.
I added following
RewriteRule ^news/((?!\d{1,3}/?$).+)/?$ /?pt-news=$1 [L,QSA,NC]
It excludes 1-3 numbers of pagination from links and make them work as planned, but if it sees slug of pt-news object it sends it to pt-news PT. It it not most elegant solution in the world but since WP is not flexible and its build in rewrite rules have no effect to its behavior (I even tried them from a codex) that was only thing which worked. Perhaps you have more flexible ideas, do you?
Forum: Plugins
In reply to: [Posts in Page] Pagination does not work with custom post typeIn my case problem was not links. I have tried many different variations, nothing worked. So I finally corrected .htaccess. Now I want to understand why that thing could not work with WP mod rewrite
No one knows? I thought that problem was solved ages ago and I am the only person who still can’t make it work…
Forum: Plugins
In reply to: [Posts in Page] Pagination does not work with custom post typeOk, I figured out that problem, that was slug conflict, although I still do not fully understand what exactly caused it. I had build in taxonomy with a slug similar to page slug and my post type slug had the same name. I changed post type slug and then removed taxonomy just in case, now pagination works fine.
Forum: Plugins
In reply to: [Posts in Page] Pagination does not work with custom post typeHeeeeyyy, is anyone alive? No ideas for such problem?
Check post privileges manually before displaying, are you familiar with PHP and wordpress output methods?
That cannot be achieved by standard functionality of plugin. You are better to look through plugings which generate menus. Something similar to woocommerce, as far as I understand your idea
Forum: Plugins
In reply to: [Advanced Editor Tools] How to disable autoresize?Although it still behaves a bit strange, it performs autoresize on page size for a second but then disables it. Is there a way to disable that behavior? It seems there other functions besides ‘editor-expand’ and method execCommand( ‘wpAutoResize’ ); . Does anyone know where they are.
Forum: Plugins
In reply to: [Advanced Editor Tools] How to disable autoresize?Ohh excuse me I found a solution in php, via filters, you can disable autoresize by following code.
add_action( ‘admin_init’, ‘my_deregister_editor_expand’ );
function my_deregister_editor_expand() {
wp_deregister_script(‘editor-expand’);
}add_filter( ‘tiny_mce_before_init’, ‘my_unset_autoresize_on’ );
function my_unset_autoresize_on( $init ) {
unset( $init[‘wp_autoresize_on’] );
return $init;
}