PGrizz
Forum Replies Created
-
Sure @doublezed2 , added here: https://gist.github.com/GitHyp/4d181404d51e7a63633afd4048c98f63
Thanks again, Mikko! That helped get the job done. ??
Actually, sorry, there’s still one minor issue. ??
These are the results for “Dark Souls” we’re getting now that aren’t in numerical order:
1) Dark Souls II: Scholar of the First Sin
2) Dark Souls III
3) Dark Souls II
4) Dark Souls: Prepare to Die Editionor alternatively searching “Gears of War” produces:
1) Gears of War 3
2) Gears of War 4
3) Gears of War: Ultimate Edition
4) Gears of War 2What would be the best way to edit the functions file to still display based on the start of post title but also display in order of No Name, II or 2, III or 3, and so on — like this:
1) Dark Souls: Prepare to Die Edition
2) Dark Souls II
3) Dark Souls II: Scholar of the First Sin
4) Dark Souls IIIWe do something similar in Python with a table that first assigns each roman numeral to a number such as I = 1 and IV = 4 then adds the values and converts to an integer and some other magic that subtracts the totals and appends the numerals which is probably way too complicated and we can’t get it to work anyways with Relevanssi… hoping you could suggest a better solution.
Yep, that did the trick!
Thanks for taking the time to make a great plugin and constantly support it via the forums. ??
Yep, that fixes the code, but adding this code doesn’t seem to change anything and we get the same Relevanssi results with or without the code added. ??
1) Dark Souls II: Scholar of the First Sin, 2) Bleach: Dark Souls, 3) Dark Souls III
Don’t think I’m doing anything wrong because the Search by Post Title code works correctly and sorts A-Z.
Hmm, starting to follow, but I believe that this line is breaking the code and functions file.
if (strtolower(substr($post->post_title, 0, strlen($query)) == strtolower($query)) {
Hey Mikko,
Thanks for the quick response! In your link I see how to sort by alphabetical order which kind of works using:
add_filter('relevanssi_modify_wp_query', 'rlv_sort_by_title'); function rlv_sort_by_title($q) { $q->set('orderby', 'post_title'); $q->set('order', 'asc'); return $q; }
But I don’t see how to also put priority on the first part of the post/page’s title.
For example, using the above code, now it displays as 1) Bleach: Dark Souls, 2) Dark Fall: Lost Souls, 3) Dark Souls II, 4) Dark Souls III, 5) Dark Souls: Prepare to Die Edition.
We’re looking for it to display with priority on titles that begin with “Dark Souls” THEN sorting those titles alphabetically like: 1) Dark Souls: Prepare to Die Edition, 2) Dark Souls II, 3) Dark Souls III, 4) Bleach: Dark Souls, 5) Dark Fall: Lost Souls.
Am I missing something in the guide or is this something more custom we need to create on our own? If more custom, can you help explain a little more how we could achieve this?
Forum: Fixing WordPress
In reply to: How to add IPv6 to htaccess to Allow Access?Hmm, not sure where I got the idea to add the \ before every period… maybe it was in another guide… but having them never caused an issue.
I tried removing the \s and it still doesn’t work.
Forum: Hacks
In reply to: Adding a custom field in addition to Post Name to Permalinks?Yep, that did it! Thanks again! =D
Forum: Hacks
In reply to: Adding a custom field in addition to Post Name to Permalinks?@wpmu DEV
I still can’t seem to get this to work… ??
The ACF plugin dev has been trying to help, but some of his advice has been going over my head and all the changes I make based off of his suggestions aren’t working.
Could you please have a look? As you would better understand what he’s suggesting and how to modify your original code to work with ACF.
Link top the support thread is again here: https://support.advancedcustomfields.com/forums/topic/subheadline-text-delayed-when-publishing/
Forum: Hacks
In reply to: Adding a custom field in addition to Post Name to Permalinks?@wpmu DEV
Yeah… I saw that. Just trying to figure out how to do it now since I’ve never done it before. ??
Forum: Hacks
In reply to: Adding a custom field in addition to Post Name to Permalinks?I made a post here on the ACF forum: https://support.advancedcustomfields.com/forums/topic/subheadline-text-delayed-when-publishing/
Forum: Hacks
In reply to: Adding a custom field in addition to Post Name to Permalinks?Looks like it’s the ACF. ??
Like you said, if I just add the sub heading as a normal custom field it works perfect. But when it’s added via ACF, it requires the double update. Changing the priority of the hook from 99 to 1 doesn’t seem to do anything.
Forum: Hacks
In reply to: Adding a custom field in addition to Post Name to Permalinks?Yes, sorry, that exact plugin using the basic text custom field added right under the title in the top position.
Forum: Hacks
In reply to: Adding a custom field in addition to Post Name to Permalinks?I’m using a basic text field in Advanced Custom Fields with metabox turned off.