ordresser
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How can you make all galleries on entire website open as media?I have an existing WordPress site, and it has galleries on several posts. Some of these galleries are set to ‘media,’ others to ‘attachment’ etc, so when a visitor clicks an image (the gallery thumbnail), it opens as that sort of link (a media file or an attachment). I want every gallery on my website to open as ‘media’ and none to open as attachment, using a function.
As far as I can tell this doesn’t work, @sterndata, unfortunately. I have tried it every which way I can think of.
Which lines are the appropriate lines?
Forum: Fixing WordPress
In reply to: Does ‘attachment’ have to be called ‘attachment’?OK, I flushed the permalinks (and cleared the cache). The result was: Server Error for the whole site, which after I removed the code from my functions.php the site came back.
Then, after putting your code back in the functions.php and re-flushing permalinks again and clearing the cache again, the website didn’t break that time, but still, the site.com/images/imagename just shows a 404.
- This reply was modified 6 years, 2 months ago by ordresser.
I tried putting your code “someplace” (tried putting it everywhere in the code) and it doesn’t seem to make anything happen. Where exactly does it go?
I also websearched your suggested querry, but the results are a lot of people with similar (but not relevant to the larger piece of code I’m trying to use in this case, a function that constructs two more articles based on ifs) questions about how to use the function.
I tried placing your code many ways in the larger piece, but I couldn’t get it to work. Where exactly is it supposed to go, please?
Forum: Themes and Templates
In reply to: [Fukasawa] How can I put other things in the flexslider?Nevermind, I figured it out
Does anyone have a solution for this, please?
Forum: Fixing WordPress
In reply to: Does ‘attachment’ have to be called ‘attachment’?I did clear WordPress’s cache. I’ve never heard of flushing permalinks, and I don’t know exactly how you’d do that
Forum: Fixing WordPress
In reply to: Does ‘attachment’ have to be called ‘attachment’?This code does in fact create a link, but the link doesn’t really work, unfortunately.
After adding the function, I uploaded a new image, then added the image (as an attachment) to an article. When I click the image (which used to go to the site.com/category/articletitle/attachment/attachmentname/ image, it now goes to site.com/images/imagename, but there’s nothing on the page (displays a 404).
The good thing about this code, though, is it doesn’t remove the ‘attachment’ address from other images already on the site, which is good because that means it won’t ruin existing links that can still go to the /attachment/ URLs, because sometimes WordPress updates and it would be a mess if the change from /attachment/ caused a problem with an update. After placing the code, I can still go to the category/title/attachment/imagename/ on the new image and it works. (Only the new domain with /images/imagename doesn’t work/goes to 404.
- This reply was modified 6 years, 2 months ago by ordresser.
Thanks. This code works well. Only, it doesn’t seem to carry over the linked headline, the featured image, or the paragraphs (it just prints the entire content in one paragraph, but does include the galleries from the other articles, which is nice)?
- This reply was modified 6 years, 2 months ago by ordresser.
Thanks. Yes, I’d been using the inspector, and actually css-ing is the one thing I’m good at webcode-wise, but it just wouldn’t apply the styles nomatter what. I ended up removing some styles from the .css that were somehow overriding anything else I tried.
OK, no probs. Just after getting headaches on these little code questions for days and then coming on here and someone helping and it working, you just feel like you want to at least offer something.
Resolved.
Also, this is really helpful stuff. If you have email and PayPal, we could maybe do something where I could ask you this type of basic question, which occurs every once in a while when I’m working on a theme for my own projects, and maybe just give you like $20cad for each simple answer via PayPal? Not a great budget, but they’re mostly just small sites with no real revenue.
I’m seeing that
<?php echo apply_filters( 'the_content', get_post_field( 'post_content', $post->post_parent ) ); ?>
carries over the fact that there are paragraphs, and puts them inside <p>’s, but it doesn’t retain the styles for p’s or allow me to add css to do so.
Is it possible to add something to this to also print the (linked) category of the original post?