newash
Forum Replies Created
-
Forum: Plugins
In reply to: [Recipe Cards For Your Food Blog from Zip Recipes] manual image urlHi HappyGezim,
Your point is totally valid. It would make the UI more complicated and if it’s really me needing it, probably wouldn’t be a great idea.
The only thing is that for me it’s a must.But this “another plugin” just gave me an idea: I haven’t looked that deep into your code, but it would be probably much easier to put a hook there for me, so in my theme I could completely override the link and the media selector functionality with the input box? If it’s even easier – with the image preview part as well, I wouldn’t mind loosing that.
So it practically would bring back the “original” behavior through a hook. And no one else would get hurt. ??
What do you think? Would it be complicated for you?
Forum: Plugins
In reply to: [Intuitive Custom Post Order] orderby issue: possible general solution…of course it’s
wp_insert_post_data
, my bad.Forum: Plugins
In reply to: [Intuitive Custom Post Order] orderby issue: possible general solutionOK, I just started to worry if we go off-topic much with this here.
So it’s just a little off-topic then. ??I don’t think it’s easy to do what you want, but here what I would do:
- I would double-check this plugins code, but it seems that you have the latest posts on top because “menu_order” attribute of a post is 0 by default. And the plugin sorts the posts by ascending “menu_order” if it’s turned on.
- There’s nothing we can change about the sorting so I would change the default 0 instead.
- I would hook onto wp_insert_attachment_data and do an SQL
MAX(menu_order)+1
on the posts and change “menu_order” to this value in the filter.
If all goes well this would make the latest post the last one. But it’s just theory, you should try it out.
Forum: Plugins
In reply to: [Intuitive Custom Post Order] orderby issue: possible general solutionYou mean: by default?
This was the first in my Google search result list:
https://www.ads-software.com/support/topic/sort-pages-by-date-in-admin-by-default?replies=4
Not the nicest with that global variable, but seems to be doing the job.Forum: Plugins
In reply to: [Intuitive Custom Post Order] orderby issue: possible general solutionHey mrseneca,
Does
WP_Query('orderby=date&order=ASC')
not work?Forum: Plugins
In reply to: [Intuitive Custom Post Order] orderby issue: possible general solutionHi hijiri,
For the first look, it seems to be OK.
Thanks for the fix!I’m curious though: should
$wp_query
already contain what’s in$args
at the point of calling hooks forpre_get_posts
? Is it triggered anywhere else then here?: wp-includes/query.php/get_posts()Cheers
Forum: Plugins
In reply to: [Intuitive Custom Post Order] ver.2.1.0 ReleaseHey hijiri,
First I’d like to state that I love your plugin.
But the latest versions were broken for me as well.
I’m not sure what is the logic you follow with these latest changes.
I’m also not sure if my thinking is right, but we might be able to help each other.With 2.1.0 you removed the ifs from the else section, so now anyone having an ordered query will have that overridden to “menu_order”. I guess that’s why people are complaining here.
I’m also not sure why are you dealing with the global
$args
in the first place. As I can see at the pointhicpo_pre_get_posts()
runs$wp_query
is already set up with whatever is in$args
so why don’t you just focus on$wp_query
?
Am I missing some use cases here?I have already created a topic a while ago about this very same issue, please check it out: https://www.ads-software.com/support/topic/orderby-issue-possible-general-solution
Cheers!
Forum: Plugins
In reply to: [Intuitive Custom Post Order] orderby issue: possible general solutionHey Anriette,
Thanks for the feedback, now it’s working at least for the two of us. ??
I haven’t created a snipplet myself, but looking at yours made me wonder if the “playing safe” like
if ( isset( $args ) ) ...
part is necessary at all. I mean in theory.
Should$wp_query
already contain what’s in$args
at that point already?I meant this question mainly for the original developer, what do you think hijiri?
Forum: Plugins
In reply to: [Intuitive Custom Post Order] orderby issue: possible general solutionOK, more specifically I was thinking about this in the
hicpo_pre_get_posts
function:if ( $active ) { if ( !$wp_query->get( 'orderby' ) ) { $wp_query->set( 'orderby', 'menu_order' ); } if ( !$wp_query->get( 'order' ) ) { $wp_query->set( 'order', 'ASC' ); } }
Is there any chance you would check it at see if it works?
…or use this: https://www.ads-software.com/support/plugin/wp-smtp
It has been also removed for a while, but it’s back now.
I believe this is the original to Easy WP SMTP.PS: It says “compatible up to 3.8.3” but I’m runnig it with 3.9.1 fine.