joshrodgers
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: NextGEN Conditional StatementI figured it out!!
My final code looks like: https://pastebin.com/jENKKANp.
Basically the code checks see if the number of images IS larger than the number of images displayed per page…if it is larger I
echo
what I want it to do…if not, it does nothing.Thanks,
JoshForum: Fixing WordPress
In reply to: Gallery PaginationI decided to use the NextGEN gallery instead, it takes a few extra steps to do what I want it to do…but it’s not bad ??
Forum: Fixing WordPress
In reply to: Gallery PaginationMalvouz,
That’s an awesome feature, but not quite what I had in mind. What I wanted to do was:
1. Make a new post
2. Add some photos and choose WordPress Gallery
3. Link your image to attachment file.
4. PostThen, on the front-page, instead of displaying 50 images the gallery would display six and then add previous and/or next links at the bottom of that page – not the attachment page (paginating the main gallery page).
Thanks,
JoshForum: Fixing WordPress
In reply to: Gallery PaginationMalvouz,
Thanks for taking a stab at it…I added your code just inside the close of the WordPress loop (right before the
endif
) and it didn’t seem to do anything, is there something else I have to do on my post to make this work?Thanks,
JoshForum: Fixing WordPress
In reply to: Gallery PaginationThe code generated looks like this: https://pastebin.com/B6jW5v7m.
Thanks,
JoshForum: Fixing WordPress
In reply to: Noscript on posts with JavaScriptI just decided to leave it off, most people have javascript enabled anyway…and those that don’t see problems on all pages all over the place!
Thanks,
JoshForum: Fixing WordPress
In reply to: Child Category ExcludeI decided to go in another direction with this website…I’m doing the same thing, just doing it differently, making this question no longer valid.
Thanks,
JoshForum: Fixing WordPress
In reply to: Child Category Imagewpcanyon,
Me too ??
Thanks again!
Forum: Fixing WordPress
In reply to: Child Category Imagewpcanyon,
Unfortunately, that was one of the first variations of the code, and it did not work ??
I continued to tinker with the code and found something that works ?? Yay!
My final code looks like: https://pastebin.com/8ixt6z6v.
Basically, in this version a couple of things changed:
1. I changed the
if
to make sure that the parent category exists and that we have a post, if both of those conditions are met then it will display my content…if not, it does nothing.2. Since the
else
wasn’t working I wrote my own…that says…if the parent category or the child category doesn’t exist than display my error message…if so, than do nothing.Not sure why the else doesn’t work, but my guess is it’s because of the
foreach
that’s the only thing that’s different in this loop, that’s not in most other loops.Hope this helps someone else ??
Thanks wpcanyon for all your help!!
Josh
Forum: Fixing WordPress
In reply to: Child Category Imagewpcanyon,
Ok, I’m getting close…not sure why the else didn’t work, but essentially I created my own else by adding a check for the child category.
My code looks like: https://pastebin.com/ZW7Sb3H9.
The only thing that doesn’t work is…If the category doesn’t exist I should get a Sorry, no posts matched your criteria error.
Any ideas?
JoshForum: Fixing WordPress
In reply to: Child Category Imagewpcanyon,
Since I was testing, I only have one image posted, but you can see the returned array at: https://pastebin.com/cHCRzwJf.
Also, it should be noted that I went back to: https://pastebin.com/yPtmxiqZ because for some reason, even with content, nothing was returned using the code: https://pastebin.com/tH2hSxMm.
Having said all that, my code now looks like: https://pastebin.com/VLhdZT8C.
* I also added the posts_per_page parameter to my array (instead of using showposts)
Thanks,
JoshForum: Fixing WordPress
In reply to: Child Category Imagewpcanyon,
I updated the code, but it still doesn’t work ??
Thanks,
JoshForum: Fixing WordPress
In reply to: Child Category ImageOk,
So now my code looks like: https://pastebin.com/tH2hSxMm
if I remove the category I get the Category doesn’t exist error, but if the category does exist – just has no posts – I still get the category doesn’t exist error. I thought this would fix it for sure, but for some reason I’m still off a little bit somewhere. Getting closer!!
Anyone have any ideas?
Thanks,
JoshForum: Fixing WordPress
In reply to: Child Category ImageI almost got it working!!
This is my new code: https://pastebin.com/yPtmxiqZ
The concept works, the only thing is that my else doesn’t quite work…if I add a category that doesn’t exist It shows all posts, I expected that I’d get a Sorry, no posts matched your criteria error. Any ideas why that doesn’t work?
Forum: Fixing WordPress
In reply to: Child Category ExcludeAndrew,
This looks awesome, but after I added the code, my website disappeared…I removed the code and it re-appeared, I’m thinking due to something in the code…any ideas?
Thanks,
Josh