Pagination on custom post type not working

I’m having a hard time getting pagination to work with my custom post type query. The standard “previous_posts_link()” and “next_posts_link();” aren’t working. And through a bit of testing, I’ve noticed neither “get_query_var(‘page’)” or “get_query_var(‘paged’)” are working. Also, adding “/page/2/”, “/2/”, or “/?page=2” isn’t finding a page. Any suggestions? if ( get_query_var(‘paged’) ) { $paged = … Read more

how to rewrite folder name in url to another name

I am wondering wether it’s possible to use Apaches .htaccess to rewrite a folder name – using a WordPress function. Lets say I have a url like: http://example.com/folder1/folder2/page.php Now I want to rewrite the url to (for example) http://example.com/testing/folder2/page.php The folder1 is an existing url. How can I change it to testing? The following I … Read more

Please Check this ‘.htaccess’ File

I just found my ‘.htaccess’ file has the same lines of code repeated twice as below, maybe some plugins changed it, is it incorrect? Should I remove the repeated one? Thanks!! <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # BEGIN WordPress … Read more

wordpress url rewrite Query Var to Static url

i have urls like these: http://animup.net/manga/bara-no-maria/ and have some url parameters http://animup.net/manga/bara-no-maria/?chp=1 http://animup.net/manga/bara-no-maria/?chp=2 http://animup.net/manga/bara-no-maria/?chp=3 …. is there anyway to have urls like these: http://animup.net/manga/bara-no-maria/chp-*/ I found my solution: here is my code: add_action(‘init’,’mangareader_init’); function mangareader_init() { global $wp,$wp_rewrite; $wp->add_query_var(‘chp’); $wp_rewrite->add_rule(‘manga/([^/]+)/c([^/]+)’, ‘index.php?post_type=manga&name=$matches[1]&chp=$matches[2]’, ‘top’); // Once you get working, remove this next line //$wp_rewrite->flush_rules(false); } Answer Okay … Read more

How can I output completely custom content with plugin while still having header, footer, sidebar etc [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 years ago. Improve this question What I want to do is make some url rewrites that will be handled by … Read more

Hide / rewrite download link

I want to hide the actual path of my downloads that look like this http://my.wordpresssite.com/wp-content/uploads/2012/12/example.pdf and instead get something like this: http://my.wordpresssite.com/downloads/example.pdf I guess I have to do this by rewriting, but I am really not comfortable with that. Could somebody suggest a solution to my problem? Answer You can use the plugin “Download Monitor” … Read more

How to get the perfect WordPress, WooCommerce, Custom Post Type pretty permalinks?

I would like some clarification on how to achieve the following structure: Posts & Categories domain.com/blog/ – Blog index domain.com/blog/%category%/ – Blog category archive domain.com/blog/%category%/%sub-category%/%post-name%/ Single Post Pages & Child Pages domain.com/%page%/ – Single Page domain.com/%page%/%child-page%/ – Single Child page WooCommerce Products & Categories domain.com/shop/ – Shop index domain.com/shop/%category%/ – “Product Category” taxonomy archive domain.com/shop/%category%/%sub-category%/%product-name%/ … Read more