ratamatcat
Forum Replies Created
-
Forum: Plugins
In reply to: [Media Library Assistant] Set a Parent to another attachment pagehi David,
I have changed to a new theme that I want but unfortunately this has stopped working.
When I ‘View’ an image from media library assistant it goes to the correct URL if the image is attached to a Page. But if the image is attached to another image it tries to find its URL:
https://www.mydomain.com/?attachment_id=3459
… and then redirects to the parent URL shortly afterwards
https://www.mydomain.com/test-1/madman-crane-levers-01/And when I view the image from media library the URL is:
https://www.mydomain.com/test-1/madman-crane-levers-01/#main/addl-01-madman-crane-levers-01/#main
(test-1 is a Page the first image is attached to)
in the default WP theme when I view the image from media library assistant or from from media library the URL is:
https://www.mydomain.com/test-1/madman-crane-levers-01/addl-01-madman-crane-levers-01/
The #main seems to be interfering. I tried with the following code removed from my attachment.php template to no avail:
id="main"
generate_do_element_classes( 'main' )
do_action( 'generate_before_main_content' );
It’s worth noting that if I type in the URL into a browser manually it works in the new theme:
https://www.mydomain.com/test-1/madman-crane-levers-01/addl-01-madman-crane-levers-01/
I have asked the theme provider about this a lot but they are not very helpful. This works in all the default WordPress themes and another third party theme I tried as well but not this theme that I want.
thanks,
Forum: Plugins
In reply to: [Media Library Assistant] Set a Parent to another attachment pageThanks David, worked great. Off to a flying start!
I want to ‘nest’ additional images within other images. The additional images will be found by a user only from inside or within the initial (parent) image attachment page where they can link to them. They will not be shown in a main gallery page (so the main gallery/ies are not bombarded with similar variations of the first image theme). The user continues down the line of the first image, deep instead of wide.
Parent:
https://www.imjexa.com/madman-crane-levers-01/
Nested:
https://www.imjexa.com/madman-crane-levers-01/addl-01-madman-crane-levers-01/Both attachment page examples above will have its own MLA Gallery with a max of 20 or so images for the gallery. So when I max out I will spill more versions onto the additional page. I thought if you have too many gallery thumbnails it becomes hard to see on the phone. Besides that, an additional page can also mark a step change in the theme of the image itself; still similar but changing things up.
Only ‘01’ attachment page will have the gallery and is seen by user. But there will be up to 20 uploads
I suppose time will tell whether my approach here is sound or silly.
Hi bcworkz,
I recently learnt that whenever you upload an image to the WordPress Media library wordpress actually creates a page to go along with the image. This ‘Attachment Page’ I had always ignored until I looked a bit closer. But this is great because now I can create a singular page such as a ‘Gallery’ page and have a bunch of thumbnails on it (with pagination for this page) and then in each of those thumbnails I set to “link to attachment page”.
There is no need for me to manually create WP pages for each image upload which is what I was doing before to create these ‘link to’ pages for each image because its already created automatically. This attachment page working as a predefined layout displays the image and the standard WP metadata ‘Description’ text I entered and also has its own template file in the standard WP “Twenty” themes at least i.e Twenty Fourteen that contain functions suited to the display of media related info to present to people who might view and browse such an image gallery. for example next and previous button like a gallery browse.
So with ‘image 1’ upload for example I have a URL ready to go:
https://www.mydomain.com/gallery/atmosphere-processors-plain-01/In the “Edit Media” screen of the image in WP Media Library I can now add to the standard WP metadata for every upload with my own metadata (using a custom fields plugin because I’m not a programmer) and these show up in the attachment page and enable me to add additional content about each image like author, medium, type of work, and copyright details as well as a small story or background on the image in a text area field. Whoever thought of this attachment page idea in the WP camp has a vision. Its helped me automate the creation of image gallery and combine interesting associated textual information.
I read up on canonical URL after your reply and this is what I need. On support.google.com this put my mind at ease: “There are valid reasons why your site might have different URLs that point to the same page, or have duplicate or very similar pages at different URLs”. Mine is the second category in this statement.
https://www.mydomain.com/gallery/atmosphere-processors-plain-01/
https://www.mydomain.com/gallery/atmosphere-processors-plain-02/
https://www.mydomain.com/gallery/atmosphere-processors-plain-03/Later I will specify the canonical url to be first image and the others ignored. The first has all the custom fields on it, is the only one linked from ‘gallery’, and the others are accessible only as popup images in a lightbox once on the attachment page #1. not as their own pages.
For now I will continue to get my site developed and then later check what google identifies is the best version using their URL Inspection Tool. Then I will follow your method outlined for specifying precisely the canonical URL in the head if google has the wrong page I want.
What you said about the leading zeros was exactly my thoughts as well, otherwise it jumps around. But I notice that in the WordPress system (I forget where now, but in creating new posts I think) they don’t use the zero, and it does look better as “-1” than “-01” because its less busy to look at. But the problem is in sorting above 10 items. So I think I will use the zero because sorting is important I hate it when a file is stuck somewhere else in a list and you have to hunt for it.
thanks!
Forum: Developing with WordPress
In reply to: get image caption use in page templateHaving dug depper I find the Attachment Page is exactly what I need. Now I won’t have to create hundreds of WordPress pages to hook into my custom template I’ll just use the Attachment Page WordPress already creates for each image which is uploaded and the existing theme template it uses, for further customization. And because its a WordPress thing there are online tutorials, for example adding new custom fields to the image metadata and showing these in the template. This will save me heaps of time. Thank god for the effort of my trying research over the past week and also your advice.
The people behind WordPress really know what they are doing!
Forum: Developing with WordPress
In reply to: get image caption use in page templateActually this is exactly what the Attachment Page does (displays the Description with the Medium image size) so I need to figure out how to get this behavior but without linking off to the attachment page
Forum: Developing with WordPress
In reply to: get image caption use in page templatethanks gents,
I should have earlier been clearer and said this ‘Caption’ is the metadata which user enters for the image when uploaded into WordPress media library, i.e. Title, Caption, Alt text, and Description. I am sure you are familiar.
after some more study it now must be the Description instead of Caption. Suitable for longer text.
Thanks for the code provided but I am having trouble seeing how to target each WordPress Page with the php code. So would a revised simple method work..
rather than using php in page template, what if I use per-Page approach instead.
So on a WordPress Page I insert an image using visual editor
then below it in editor place a shortcode to pull and place it’s Description right underneath image. (Just like the default WordPress setup of Caption is shown underneath a thumbnail image but I am going to be inserting a medium or Large image size and require the Description instead of Caption). Normally Description is on Attachment page on link off
If shortcode has no chance then I wonder if php could be used so the ID doesn’t need to be mentioned but the code somehow just automatically loads the Description for each image for each page. Put some code in functions then also in custom template. The is_page thing is very repetitive
thanks
Forum: Developing with WordPress
In reply to: WordPress Menu and is_page to navigateGreat info I’m going to follow both your suggestions and link and see if I can figure this out, it may possibly require a developer to make this menu. On top of the transporting of the user to pages I need the navigation buttons to disable if there are not have any outgoing pages defined on it, rather then hide buttons so the menu doesn’t shift. First is also a new theme and see what happens menu wise then come back to this. I’m hoping it will put on a new display location that’s a bit lower.
Forum: Developing with WordPress
In reply to: Using variables with is_page conditionalHi Steve, tried this out and it works a treat,
Thanks!Forum: Developing with WordPress
In reply to: hide a heading with CSS based on 2 conditionshi yep I was unable to place this in the ‘else’ section due to it needing to use the condition of “both” as explained because the heading was becoming hidden when I wanted it visible in one of the cases. But reading your reply has helped because I have decided to go with some paid customization for a related page that covers the naming/labelling of the items and therefore allows me to remove altogether the need to show as much content in the page I’ve been trying to make work.
It’s cathartic to select blocks of code and simply hit delete!
Forum: Developing with WordPress
In reply to: managing large number of page ID’s with is_page conditionalthanks for the info!
Forum: Developing with WordPress
In reply to: managing large number of page ID’s with is_page conditionalHey Mohammad this is great.
(I like your little test but I eventually discovered it, the missing bracket!)
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Table data for different recordsmaybe I should just keep them logically disconnected, and see how the maintenance demands go, and take it from there.
Thanks Tobias
Forum: Plugins
In reply to: [RPS Include Content] paragraphs run togethersorry about the delay I have been waiting for the plugin developer to get back about this. They say there are no test sites that can be accessed. But do you have a safe email I can send you access to my own site, which is currently password protected, and you can go in there. I’ll send the site and password
thanks
Forum: Plugins
In reply to: [Ultimate FAQ Accordion Plugin] Show content of FAQ onlyexcellent
Forum: Plugins
In reply to: [Ultimate FAQ Accordion Plugin] select-faq not workingGreat!