Support » Fixing WordPress » Add image to a page title

  • Hello,

    I’m using Theme Horse Attitude Pro and recently have created a child theme to modify a few things. On my website, under the “Blog” section, I would like to add images to the titles. Personally, I would like to learn how to have just an image for a title and also how to have an image and title together formatted that the image is on the left and title is centered.

    Here’s where I’m at now. Under the my Child Theme, Appearance, & Editor I have three options I’ve copied from the parent (functions.php, page.php and Styls.css). Using the support forum on my theme, I’ve added the code to my functions.php:

    if ( ! function_exists( 'attitude_theloop_for_page' ) ) :
     * Fuction to show the page content.
    function attitude_theloop_for_page() {
    	global $post;
    	$meta = get_post_meta($post->ID, 'attitude_title_hide', true );
    	if( have_posts() ) {
    		while( have_posts() ) {
    			do_action( 'attitude_before_post' );
    	<section id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    			<?php do_action( 'attitude_before_post_header' ); ?>
    			if( 'on' != $meta ) {
    				<header class="entry-header">
    	    			<h2 class="entry-title">
    	    				<?php the_title(); ?>
    	    			</h2><!-- .entry-title -->
      			<?php do_action( 'attitude_after_post_header' ); ?>
      			<?php do_action( 'attitude_before_post_content' ); ?>
      			<div class="entry-content clearfix">
        			<?php the_content(); ?>
        				wp_link_pages( array(
    						'before'            => '<div style="clear: both;"></div><div class="pagination clearfix">'.__( 'Pages:', 'attitude' ),
    						'after'             => '</div>',
    						'link_before'       => '<span>',
    						'link_after'        => '</span>',
    						'pagelink'          => '%',
    						'echo'              => 1
                   ) );
      			do_action( 'attitude_after_post_content' );
      			do_action( 'attitude_before_comments_template' ); 
             do_action ( 'attitude_after_comments_template' );
    			do_action( 'attitude_after_post' );
    	else {
    		<h1 class="entry-title"><?php _e( 'No Posts Found.', 'attitude' ); ?></h1>

    Being new to wordpress and website design, I’m not sure where I import the image url. I learn best by looking at the before code and after code so we can use the page and the image

    How do I add the image to the title “skunked?”

    Thanks for your help, sorry if this question is far fetched.

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add image to a page title’ is closed to new replies.