Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] How to format attachment page with ATA v364? (http://forum.bytesforall.com/showthread.php?t=13948)

CoastalData Apr 27, 2011 05:11 PM

[SOLVED] How to format attachment page with ATA v364?
 
Hello, I just want to make an adjustment to the ATA "attachment" post/page, like the one you get when you click "Link to post" when using the built in WordPress uploader to put a picture within a page.

All I really want to do is to make the picture float left, and allow the description to flow around it. I've looked through the ATA options again and again, plus have searched through the files, and I just can't seem to get it...

Could somebody possibly shed some light on how to do this?

Thanks in advance,

--Jon

juggledad Apr 27, 2011 08:05 PM

atahualpa and WP versions?
url pointing to a place where the issue shows?
Have you tried switching to twenty-tnm to see if it is a theme or wordpress issue?

CoastalData Apr 28, 2011 02:14 PM

Quote:

Originally Posted by juggledad (Post 64179)
atahualpa and WP versions?
url pointing to a place where the issue shows?
Have you tried switching to twenty-tnm to see if it is a theme or wordpress issue?

Oh yes, guess I forgot that, huh? LOL! I'm using ATA 364 on top of WP 3.1.2. Here's a page that shows what I want to adjust:

http://www.aedmedical.net/ultrasound...ge-logiq-e9-1/

I did discover that I can put the image.php from the default theme in there, and then the code in there is relatively easy to adjust as needed, but it breaks the formatting and some of the features of the ATA theme.

juggledad Apr 28, 2011 02:22 PM

When you edit the post, just use the 'media' icon and after getting your image, there is a series of radio buttons to have none, left, middle or right alignment. This is a WordPress feature.

How do you add the image?

CoastalData Apr 28, 2011 02:34 PM

I added the picture to the site using the builtin WP uploader, and then insert the picture into the post and click the "Post URL" to set the Link URL property.

Here's the actual page that I've inserted the pictures into, just click any of the thumbnails on the left side to see the attachment page that needs to be adjusted:

http://www.aedmedical.net/ultrasound...ished-systems/

That attachment page is auto-generated by WP, but there doesn't seem to be very much documentation about it.

--J

juggledad Apr 28, 2011 02:42 PM

Sorry I'm not following, can you list out step by step. For example, if I want to add a image to a post
1) I edit the post using the HTML editor
2) I put my cursor where I want the post to go
3) I click the 'add an Image' icon that is just above the post area

That opens a new window 'add an Image'
4) I click the 'Select File' button
5) I choose the file and upload it
6) I now go to the 'Alignment' area of the new window and select my alignment, then click the 'Insert into Post' button

all done.

None of this has anything to do with Atahualpa.

CoastalData Apr 29, 2011 10:45 AM

Quote:

Originally Posted by juggledad (Post 64265)
None of this has anything to do with Atahualpa.

I agree, it doesn't matter how a picture got into WP, other than whether or not it was added through the builtin media management system, and it was, and that the pictures are stored in the default WP locations, and they are.

The only thing I'm trying to figure out how to do via ATA is to format the default attachment page, which most people seem not to know about, but it still affects ATA whether one knows about it or not.

That said, in order to try and clarify, here's the steps that it takes to arrive at creating/using one of those default attachment pages for yourself:

1) I edit the post using the HTML editor
2) I put my cursor where I want the post to go
3) I click the 'add an Image' icon that is just above the post area

That opens a new window 'add an Image'
4) I click the 'Select File' button
5) I choose the file and upload it

6) I now go to the 'Link URL' area, if you look underneath it, you'll see three buttons, and the third one says "Post URL". If you click this button, it will insert the path to the attachment page in the Link URL text box.

7) I now go to the 'Alignment' area of the new window and select my alignment
8) I now go to the 'Size' area of the new window and select my size
9) then click the 'Insert into Post' button
10) I click on 'Update' to publish the changes

11) I click on 'View Page' to view the published changes
12) I click on the newly placed image

13) We should now be on the "attachment" page

a.) If you were to click on 'edit post', you would see a default "media" properties editing form.
b.) The only simple changes I want to make to this page are to unlink the picture, so that it does not, from this point, link to the "naked" image, set the image to float:left, and maybe also give it a little margin on the right and bottom so that text isn't too close to it.

--J

juggledad Apr 29, 2011 11:31 AM

It's all working for me - you just have to remove the 'link URL' entry on the attachment page.

lmilesw Apr 29, 2011 12:08 PM

You don't needs to even click Post URL. You can just click the insert into post link.

CoastalData Apr 30, 2011 12:45 PM

But I WANT the original image inserted into the post to be linked to the attachment page, I just want to format the attachment page a little bit, and remove the link from the attachment page to the raw image.

Well, it looks like there's no way to achieve this from within Atahualpa, I'll have to see what I can do with either a custom image.php file inside the theme folder or via a child theme.

I've gotten this to do most of what I want via image.php, it's just the formatting of the REST of the page that goes awry when I do that, ie, the headers, footers, and so forth; I guess I'll have to copy some of the code from the "Style & Edit Center Column" page to fix it up.

lmilesw Apr 30, 2011 02:35 PM

Here is a quote for an article on attachment pages which explains things better than I can.

Quote:

The attachment pages are a strange invention. They are automatically created, but they are not permanent, and they don’t get included in your list of pages, so you have almost no control over them. You can change the page title (the default is the name of the uploaded image the way it comes up in the URL), but: the page is seemingly filed under your default category, not under the actual category of the post it is “attached” to; you can’t change the alignment or the borders of the image; and… visitors can leave comments – you can’t deactivate that!
I am not sure what their purpose really is or was.

juggledad Apr 30, 2011 08:06 PM

You should use index.php as the starting point for any custom php you make if you want the atahualpa styling

CoastalData May 1, 2011 11:31 AM

There, I got it!

Quote:

Originally Posted by juggledad (Post 64385)
You should use index.php as the starting point for any custom php you make if you want the atahualpa styling

Actually, I had tried using that before, but what confused me was that the entire post is handled by one line of code, like this:

Code:

<?php include 'bfa://content_inside_loop'; ?>
But then I realized, as I had suggested in my last post, that I needed to go back to ATA options for the Center Column, and I copied and pasted the code for The Loop into my new image.php file, and then... I was almost there, but with no picture... So, I then added the formatted image tag, as I'd found in the default image.php file, along with my custom adjustments, like this:

Code:

<div class="attachment" style="float:left; margin-right:5px; margin-bottom: 5px;"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?></div>
I placed that just after the post byline.

So, I guess to answer my question "officially", ATA does not have anything built in to control the formatting of that attachment page, and the only way to format it, apparently, is to add the additional image.php file to the theme, and if you upgrade the theme, then you need to manually copy over that file (and any others you may have had to create) to the new theme, or else you'll need to setup a child theme for ATA.

--Jon


All times are GMT -6. The time now is 11:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.