Leo Blanchette
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: User Profile Custom Fields – $_POST Empty?Here you go – thanks for help
Forum: Fixing WordPress
In reply to: Save or Fetch Settings as a Group (But not for an options page)Ok, I’ve been using
update_option()
andget_option()
for quite some time.So really the most practical way would be to pack a bunch of settings into one array and then do an
update_option('buncha_stuff', $array);
?Forum: Fixing WordPress
In reply to: paginate_links(), page or paged variable?Not to embarrass anyone, but why is paginate_links() causing &paged= to be added to the url instead of &page=?
If I manually change in the URL to page then suddenly everything works, however the
paginate_links()
function always defaults to page 0.I’ve been stuck in the Bermuda triangle of wordpress anomalies for months now… slowing dying of thirst in the parched desert of wordpress pagination answers.
Forum: Fixing WordPress
In reply to: How to Make My Own Theme Hooks / Plug-Able Features?Oh – it is easy. It was so easy it was hard to figure out because I expected it not to be easy. Thanks for helping ??
Forum: Fixing WordPress
In reply to: How to Make My Own Theme Hooks / Plug-Able Features?Not that I lack motivation – I only post here as a last resort, but I am not seeing info on this, its sort of unclear how to achieve what I’m setting out to do here… https://codex.www.ads-software.com/Function_Reference/do_action
Lets suppose I want to place some hook or action within some area on my custom post type page.
What function or method “anchors” user defined functions to a given area?
Forum: Fixing WordPress
In reply to: How to Make My Own Theme Hooks / Plug-Able Features?So there must be a do-action hook thingy I can place, say, at the end of my product price table? And call it something like “product_table_bottom” and it will fire right there?
Forum: Fixing WordPress
In reply to: Direct Query – Custom Post Type: Terms, Title.Certainly. I appreciate any help I can get. I suspect I’ll be working a few days on this one.
https://wordpress.stackexchange.com/questions/96083/special-query-title-terms-content-like
So far I was able to make a nice query which can actually go through title and content, but not terms since those are arranged differently.
Second I got stumped on another issue (maybe being a little over-ambitious) I was hoping to have the query gauge search term occurrences (between terms, title, and content) and rank them from greatest to least.
Its just the query syntax/structure I need. I can have PHP assemble it according to user input of course.
Forum: Fixing WordPress
In reply to: Direct Query – Custom Post Type: Terms, Title.Yeah, I have a talent for finding the ‘hard stuff’
Gonna make another attempt. They didn’t take kindly to it – since “its obviously an SQL question and not a wordpress one!”. Which is geek talk for “I don’t know”.
Forum: Fixing WordPress
In reply to: Direct Query – Custom Post Type: Terms, Title.PS – to see the importance here are some example sites using the theme:
https://www.theruchos.com/
https://www.travelwitness.net/
https://photo.travelling-light.net/
https://thpstockphotos.com/Forum: Fixing WordPress
In reply to: Direct Query – Custom Post Type: Terms, Title.Thats pretty interesting. I didn’t know that. But no, I’m not releasing it to the repo. This is highly specialized for turning one’s site into a stock photo selling package. It uses writing and fetching functions that would not be used on repo either.
But still the initial question is still worth asking because it could very well apply to other scenarios.
Forum: Fixing WordPress
In reply to: Custom Query: Related Posts by Shared Tag AmountThis code you gave me was probably the best thing I’ve ever gotten off of this forum – I had to make some slight modifications to the custom post type I was using, but here it is in action on a few user sites:
https://thpstockphotos.com/image/waterfall-valley-3/
https://www.clipartillustrations.com/image/robot-rocketeer-flying-up/
https://stereoshutter.com/image/coins/
As you can see it works flawlessly. I credited you ??
Forum: Fixing WordPress
In reply to: Show Comments? Site settings in generating custom post.After implementing this I get a “function not defined” and its probably not the best way of doing this.
Forum: Fixing WordPress
In reply to: Show Comments? Site settings in generating custom post.Found it – https://codex.www.ads-software.com/WPMU_Functions/get_blog_option
Forum: Fixing WordPress
In reply to: Custom Query: Related Posts by Shared Tag AmountYes, the last thing you say is what I intended to do. My other theme (where I made my own database tables) had a rather big query that performed this operation all in one hit.
I’m simply going to let the user decide when to update their related images (posts) – or perhaps run a chron job…each post will have a meta value having the list of related images :D.
Just having a decent function is enough though. There will often be thousands of posts (images) to loop through, so its best to pre-run it.
Great job on the function. I’m sure its going to help lots of people.
Forum: Fixing WordPress
In reply to: Custom Query: Related Posts by Shared Tag AmountSo you advise using this in “single.php” to keep resource use down. “single-image.php” where my custom post type — would presumably work the same?