coadr93
Forum Replies Created
-
Also, disabling the plugin on the cookie notice, terms of service, etc would be great. If I put a link and they want to read more, message keeps popping up.
Forum: Plugins
In reply to: [Minimum Order Amount for Woocommerce] Not working at all :(I updated to the latest versions. I thought that was the problem at first but apparently it’s not. I do have a woocommerce theme and a couple of woo related plugins… I’ll test with those.
Thx for the reply.
A little bit late but haven’t forgot.
1st of all, please make sure you have a complete backup of your public_html folder and database.
Playing with URL rewrites might break something. However, this worked fine for me.
Install WP Knowledgebase, and make sure you define your Knowledgebase Slug in the plugin Settings section.
Then, install Custom Post Type Permalinks plugin by Toro_Unit.
https://wordpress.org/plugins/custom-post-type-permalinks/
Make sure you activate it 🙂
After this, you have to insert some code to your site.
To do this, you can edit the theme-functions.php file via Appearance -> Theme editor. However, I do recommend adding a child theme first, as any updates to the theme will erase the code and break your URLs.
You can also use the Pluginception plugin to create a new blank plugin and add the code there.
DON’T FORGET to replace YOURSLUG with… well… your slug xD
// Rewrite URL Rules add_action( 'generate_rewrite_rules', 'register_kbe_knowledgebase_rewrite_rules' ); function register_kbe_knowledgebase_rewrite_rules( $wp_rewrite ) { $new_rules = array( 'YOURSLUG/([^/]+)/?$' => 'index.php?kbe_taxonomy=' . $wp_rewrite->preg_index( 1 ), 'YOURSLUG/([^/]+)/([^/]+)/?$' => 'index.php?post_type=kbe_knowledgebase&kbe_taxonomy=' . $wp_rewrite->preg_index( 1 ) . '&kbe_knowledgebase=' . $wp_rewrite->preg_index( 2 ), 'YOURSLUG/([^/]+)/([^/]+)/page/(\d{1,})/?$' => 'index.php?post_type=kbe_knowledgebase&kbe_taxonomy=' . $wp_rewrite->preg_index( 1 ) . '&paged=' . $wp_rewrite->preg_index( 3 ), 'YOURSLUG/([^/]+)/([^/]+)/([^/]+)/?$' => 'index.php?post_type=kbe_knowledgebase&kbe_taxonomy=' . $wp_rewrite->preg_index( 2 ) . '&kbe_knowledgebase=' . $wp_rewrite->preg_index( 3 ), ); $wp_rewrite->rules = $new_rules + $wp_rewrite->rules; } // A hacky way of adding support for flexible custom permalinks // There is one case in which the rewrite rules from register_kb_rewrite_rules() fail: // When you visit the archive page for a child section(for example: http://example.com/kbe_knowledgebase/category/child-category) // The deal is that in this situation, the URL is parsed as a Knowledgebase post with slug "child-category" from the "category" sectionAfter this, configure the Custom Permalinks Settings (General Settings -> Permalinks) like this:
Where it says kbe_knowledgebase http://yoursite.com/YOURSLUG add this:
/%kbe_taxonomy%/%postname%/Then, check the box under, where it says “Use custom permalink of custom taxonomy archive. If you check this, the custom taxonomy’s permalinks will be http://yoursite.com/post_type/taxonomy/term”
Click save permalinks and it should do the trick.
Ok, I shall prepare a post this evening.
Forum: Plugins
In reply to: [WP Hide & Security Enhancer] How will the plugins update if I rewrite URLsThanks so much for the info! I will consider doing this.
After changing the name of my child theme builtwidth was still able to detect theme so I want this changed.
Forum: Plugins
In reply to: [No CAPTCHA reCAPTCHA] Error when resetting passwordI’m pretty sure it’s this one man. I disabled it and it works. Also, I added another captcha plugin without issues. The thing is your lets me customize where to put it and the other just puts it everywhere.
As I said, users get the password reset link, but when they click it in the e-mail, it says invalid token on the website, and no option to write the new password appears. Just the login page again.
Same error on my side. I wanted to start this thread as well but it was already here.
So basically, on PW reset you can request the e-mail, but when you click the link inside the e-mail to confirm reset, it says invalid token 🙂
Ok Igor thanks I’ll see what I can do ! Thank you a lot for your effort. Home I figure this out.
I’ll rate u a big 5 stars.
PS you can edit any comment in fact.
Just use this url https://wordpress.org/support/reply/8970511/edit/ but but change the number before edit with the ID of the reply. You can see the ID by clicking the time and date of the reply you want to edit 🙂
If it’s the first post just add /edit after
I have edited the main post of this thread as proof you can check.
But it’s not necessary to remove the links, they don’t rly matter, but ppl might be able to detect that I use wordpress and what theme, security issues, you know.
Thanks again
- This reply was modified 9 years, 3 months ago by coadr93.
Yes, you are right, I checked that the code is put on the second subpage of blog, third, 4th, etc.
But when infinite scroll, it doesn’t work anymore.
The theme author said:
“The theme definitely uses the_post() – the blog posts wouldn’t work without it.
I’m not sure ow the plugin inserts ads, but the theme pulls in the second page of posts using the URL (yoursite.com/page/2). If the ads are inserted on load, then I guess this wouldn’t work as that page never truly loads, jQuery loads it for you.”
It must be Ajax call and smth with jQuery.
When is the insert ads code called ? If it’s on page load, then the page doesn’t load again when you scroll down to generate new pages through jQuery.
Can you please explain this better ?
“Therefore I assume it has to do with the ajax call. Can you check the url that is used for ajax calls?
To insert after 9 posts (and then every 9 posts) set filter to 1 and black-list / (homepage, first subpage). You don’t have to define max insertions if you use filter.”
Also, will you please kindly remove the links to the website ?
I already tried that, still does not work. I set it to 3 and 6 now you can check.
I really wanted it after 9 posts that’s why initially I configured it for After Post so that it generates at the end of every page loaded.
You noticed this:
“Code block 1 is configured for After Post automatic insertion and is inserted normally.”
But it still doesn’t work 🙁
I think it has something to do with the Ajax… If I use paginated view ( click on page 2,3,4 … ) it works but if I use masonry which loads page with Ajax it doesn’t.
Sorry Igor, the site is on dev and I don’t want backlinks to it yet so it doesn’t get indexed or anything, that’s why I try keeping the link off.
I will tell the plugin author about the_post hook and see if he can fix anything.
Thanks a lot for the answers !
P.S. I did check both index and archives pages and it seems like there is this line of code:
<?php while ( have_posts() ) : the_post(); ?>
- This reply was modified 9 years, 4 months ago by coadr93.
He said this:
“I’m not sure what he means by “post hook”. Maybe he can explain a bit more?
Basically, the load more button has the URL to the next page attached to it, on click we use jQuery.GET to pull the content from the next page and display it on the current page. It should be the same content as when you go to yoursite.com/page/2”
Can you elaborate on what you mean by “post hook” ?
I also tried without infinite scroll ( load more button ) and basically it simply calls the content from page 2, but no ads 🙁
Ok Igor thanks I’ll talk to him.
ok… I fixed it, I was playing with the settings trying to make it work.
Can you please check now ?
But it is obvious that it doesn’t generate any more Between Posts as I check with debugger.
There is the After Post after the first page, but when the second page loads on scroll, there are no Between Post or After Post anymore.
https://s24.postimg.org/5jcp05ezp/afterpost.png
Look here. Is it because of the Loop Template ?
- This reply was modified 9 years, 4 months ago by coadr93.
I have enabled remote debug.
Basically, I want to display an ad every 9 posts. The theme uses Ajax to generate endless scroll on homepage. Limit is set on 9 posts per page, so 9 posts generate every time.
I can get it to display the ad only on the first set of 9 posts, but not on the rest that generate after scroll.
These are the exact settings I used.