Viewing 6 replies - 1 through 6 (of 6 total)
  • Just to clarify, you mean to add featured images to the left side column under the title, for each post?

    Thread Starter epplerdesign

    (@epplerdesign)

    Hi blackawxs,
    thanks. No just a regular image, not necessarily featured. I’d like it to align so that when the site is being viewed on a desktop browser the image is on the left column and the accompanying text is next to it on the right column.

    The easiest way I have discovered to do this type of customization involves a plugin and a little of coding.

    * Install Advance Custom Fields
    * With that plugin, create a custom field that allows for images, on all your posts.
    * Go back to any of your posts in admin area, and see that towards the bottom of each post, advance custom fields has an area for you to use. Use that area to add your image(s).
    * Within your php files (depending if you are working on pages or posts), find the right file, and add advanced custom fields coding to it.

    That’s a high level breakdown on the process…just 4 steps to get you going.

    Hopefully this helps. If you find an easier way, please share.

    Thread Starter epplerdesign

    (@epplerdesign)

    Awesome. I will give this a shot, prob later tonight or tomorrow, and let you know how it goes. Much appreciated!

    losrack

    (@carlos-jaramillo)

    Is much easier, and without any plugin and straight forward with this:

    
        add_filter( 'the_title', function( $title, $id ) {
        static $i;
    
        //add conditional page and in loop, i.e post id = ID
        if ( is_page( ID ) && in_the_loop() ) {
            $i++;
    
            //add conditional for filter position
            if ( 1 === $i ) {
    
                $title .= '<div class="imgtitle"><img src="IMAGE URL HERE"></div>';
                $title .= '<p>' . __( 'Text', 'textdomain' ) . '</p>';
                $title .= '<p><a href="#link">' . __( 'Link' ) . '</a></p>';
            }
        }
    
        return $title;
    }, 10, 2 );

    Just put the corresponding ID for desired pages. Here the class is “imgtitle” but you can put any class.

    Also if you don’t want text and/or link just take it out or // comment on both or any one.

    • This reply was modified 6 years, 7 months ago by losrack.
    Thread Starter epplerdesign

    (@epplerdesign)

    Terrific. Thanks losrack. Do i put that code into the “Additional CSS” form in the customize screen? Also, is there any change i need to make to any of the other lines?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding images to the left column’ is closed to new replies.