mkericson
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Spun] Show post title over images during rolloverAhhhhh….so sorry, I should have caught that!
Copied the code through BBEdit first before pasting and it looks like it’s working. Post titles are rendering on the page below the images. Now just need to work on applying the CSS.
Thanks so much! It’s really going to help the navigation for our magazine.
Forum: Themes and Templates
In reply to: [Spun] Show post title over images during rolloverI simply dropped in the revised code into content-home.php, so that it now reads as follows:
global $post; $postclass = ''; if ( '' != get_the_post_thumbnail() ) { $thumb = get_the_post_thumbnail( $post->ID, 'post-thumbnail', array( 'title' => esc_attr( get_the_title() ) ) ) . '<span class="no-thumbnail">' . get_the_title() . '</span>'; } else { $args = array( 'post_type' => 'attachment', 'numberposts' => 1, 'post_status' => null, 'post_mime_type' => 'image', 'post_parent' => $post->ID, ); $first_attachment = get_children( $args ); if ( $first_attachment ) { foreach ( $first_attachment as $attachment ) { $thumb = wp_get_attachment_image( $attachment->ID, 'post-thumbnail', false, array( 'title' => esc_attr( get_the_title() ) ) ); } } else { $thumb = '<span class="no-thumbnail">' . get_the_title() . '</span>'; $postclass = 'no-thumbnail'; } } ?>
Again, my knowledge of PHP is limited, so I apologize if this was an obvious error. I’m much more confident with the styling to get the rollover effect working, but getting the post title to render is proving challenging.
Forum: Themes and Templates
In reply to: [Spun] Show post title over images during rolloverThanks for the effort Caroline. I appreciate it. Unfortunately I’m getting a parse error for an ‘unexpected ‘&” in that line.
Thoughts anyone?
Forum: Themes and Templates
In reply to: [Spun] Show post title over images during rolloverI know, logically it would seem that everything I would need is right there; but my knowledge of PHP is limited and even after spending an entire day experimenting with the code for content-home.php I was no closer.
I’m a novice coder. Can you explain exactly what you did to whitelist the page/action variables?
I see the whitelist box in WP Better Security, I just don’t know what to put in there?
I’m using WordPress Firewall, too.
I’m experiencing the same problem, and am wondering if the plugin is being compromised from an outside source, or if it’s simply an issue with the plugin itself.