• Dusty

    (@ameliapower)


    This should be simple but I’m having trouble with adding images. I’ve tried adding the images to the “add media” section and attaching them to a post. I’ve also tried getting the url and adding it as a custom field. Either way all I get is the alt text.

    I’ve pasted the code for the index.php and also the single.php. Would really appreciate some help.

    single.php: https://pastebin.com/2DSZ7Gb2
    index.php: https://pastebin.com/rR8TeNce

Viewing 6 replies - 1 through 6 (of 6 total)
  • Are you using the media manager?
    In post/page editing window from admin panel press the add image button (first one after Upload/Insert text) and it will open the media manager. From there press the Select Files and the files selected will be uploaded and will be available ONLY for the current editing Page/Post. After that you can go to the gallery tab, press the show link in right of the needed picture and a menu with options will drop down. From here after setting the needed option press Insert into post

    For more info i think you will find information in the codex.

    Thread Starter Dusty

    (@ameliapower)

    I’ve tried doing it that way but the problem is none of my styles are respected in my theme. I’ve tried hardcoding…putting images/image.jpg after the bloginfo bit in index.php and my styles are working but surely there’s a way that I can do it from the dashboard that allows for my styles to be respected in my theme.

    Thanks

    sorry, I wasn’t aware of this rule.

    I had seen this message “New Topic in this Forum –
    Before posting a new topic, be sure to search to see if one has been started already.” so I thought it was okay to ask about my similar problem here.

    @dataport: It is considered impolite to interrupt another poster’s thread. Please post a new topic.

    Thread Starter Dusty

    (@ameliapower)

    I don’t know if I explained things well in my first post but I was trying to insert my images and have control over the styling. Anyhow after searching around I found this article which was really helpful:
    https://www.tutorial9.net/tutorials/web-tutorials/add-thumbnails-to-wordpress-with-custom-fields/

    So basically I can reuse the two custom fields…one for thumbnail for the posts page and a large one for the single.php. I just made sure it was wrapped in my div class so that they got their border, had their float: left applied and the text was to the right. Works a charm.

    really great to hear that.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘add media, images’ is closed to new replies.