Erik
Forum Replies Created
-
Forum: Plugins
In reply to: [Global Content Blocks] Stay in content block edit page after saveNo! Do not change that behavior.
Rather add two buttons: “Save” & “Save and Close”
I like the close behavior, but my content blocks are only snippets…
Forum: Plugins
In reply to: [Category Posts Widget] 2014 theme no except and icon – design brokenHello,
That looks good! Thanks!
/E
Forum: Plugins
In reply to: [Smarter Archives] Configure according to https://robinadr.com/archivesHi Rob1n,
I thought you were using the plugin short code. I’m trying to use as little custom code as possible… but I’ll consider your approach.
Thanks!
/Erik
Forum: Plugins
In reply to: [SEO Smart Links] 3.0 (and 3.0.1) update destroys performance and kills siteBut that mod will fail in the case that you publish post A using the word “Post B” and then create post B afterwards.
You have to go back and publish post A once more for it to link to post B.
Here’s a link to a test site:
Forum: Plugins
In reply to: [Syndicate Press] Styling with CSS is hard with current HTML designHi,
That looks really nice! Good work!
/E
No problem (I have a mail rule!)
However, I’m sorry to report that I’m running 1.6.5 and I just verified that the problem persists. Has the bug perhaps found its way back since 1.6.4?
Not sure if I’ve had this problem with 1.6.4 though (didn’t pay attention to versions) so either there’s still problems or I’m having a problem with my setup.
Regards,
ErikForum: Fixing WordPress
In reply to: Upgrade to 3.8 breaking is_main_query() functionHmmm, it seems I have to apologize. My problem doesn’t seem to have anything to do with this problem after all.
If I just do:
function my_get_posts( $query ) { $query->set( 'post_type', array( 'post', 'page', 'character', 'location' ) ); }
…I can make posts and pages appear on the first page, but still not “characters” and “locations”… seems there’s something wrong with something else…
Oh, yeah…I’m a blind fool! It’s registered as:
register_post_type( 'character_post_type', $args );
Using this code:
function my_get_posts( $query ) { $query->set( 'post_type', array( 'post', 'page', 'character_post_type', 'location_post_type' ) ); }
…Gives me the desired results…
Phew! I’m sorry! ??
Forum: Fixing WordPress
In reply to: Upgrade to 3.8 breaking is_main_query() functionHello,
I think I’m having the same (or a similar) problem as above, however I am running WordPress 3.8.1.
I am testing with the following
pre_get_posts
hook:add_filter( 'pre_get_posts', 'my_get_posts' ); function my_get_posts( $query ) { echo 'is_main_query: ' . ($query->is_main_query() ? 'y' : 'n'); }
With an unmodified twentyfourteen theme this results in 4 prints of “is_main_query” where only the first one prints
is_main_query: y
while the other 3 printsis_main_query: n
When the code gets to the “main div” (where WP prints a list of posts)
is_main_query
isfalse
.The first two calls to
is_main_query
happens even before any HTML is output.However, looking at the implementation of WP_Query::is_main_query() I am not sure my results say anything substantial… and looking at that code it seems to me any kind of state cannot be changed (only the identity of the WP_Query object being used).
I am trying to implement listing of custom post types with the following (well known) implementation of the “pre_get_posts” hook:
function my_get_posts( $query ) { if ( $query->is_home() && $query->is_main_query() ) $query->set( 'post_type', array( 'post', 'page', 'character', 'location' ) ); return $query; }
As you can imagine, this does not give the desired result… because
is_main_query
isfalse
where the posts should be printed.Am I supposed to use some other kind of test than
is_main_query
? Or is this another bug? The same bug?Kind Regards,
/Erik
Forum: Plugins
In reply to: [Syndicate Press] Styling with CSS is hard with current HTML designThanks!
I’m looking forward to it!
Kind Regards,
/Erik
Hi,
Yes! That seems to do the trick!
Thanks a lot for the help!
/E
Hi,
I didn’t even knew I could increase memory with my ISP.
It seems to work. At least I have no more errors!
Thanks!
/E
Forum: Plugins
In reply to: [Solid Mail – SMTP email and logging made by SolidWP] PHISHING plugin?This incident made me realize I was putting my Google login information in a database on the web … which isn’t actually my style.
On the other hand, my server has been hacked before, and I’ve had things happening with my Google account before (unsure if it was a Google glitch or me being careless with my login info).
So, this was probably just a coincidence!
And, it was a question of whether this plug-in was phishing or not…
The question has been answered to my satisfaction, and that’s good enough for me.
Thanks for your replies guys!
Forum: Plugins
In reply to: [WP-o-Matic] Wp-o-matic on 3.5Correction. Multisite cron works just fine! (It was a PEBKAC problem! :o)
I haven’t tested the ampersand problem, but I also don’t think there’s been any new version of WP-o-Matic since before.
Forum: Plugins
In reply to: [WP-o-Matic] Unix/Web Cron unavailable on multisite?Okej,
This was actually my fault!
I used a security plug-in that disallowed direct access to the wp-content folder.
I can now verify that running WP-o-Matic on Multisite works just fine!
Simply do exactly like on single site.
No difference!