betic1
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Issue with functions.php IF statement or conditional statementsNever mind. This wasn’t making sense because I had the shortcode to call this function in 2 separate files: the actual single.php and the content.php which is why it showed up twice.
That was it. Works perfectly now! I knew it had to be something simple. I never would have known to put the endif: statement in. Thanks!
My apologies for posting a follow up to the above question, but there is no edit button for my post so I’ll just retype it all here…
I’ve read about using the pluggable functions and have tried to implement a simple override using one, but it keeps throwing an error. Here is a page that I read about doing this using the Twenty Eleven Theme: link. I’m trying to do something similar with the Twenty Thirteen Theme.
I’m simply trying to replace the arrows in the previous and next page links on the Twenty Thirteen Theme at the bottom with a small image on my Child-Theme. I don’t want to just hide the DIV with CSS as I need that DIV to show my image in. Here is the code I modified from the functions.php from Twenty Thirteen (I simply removed the 4 instances of the arrows and replaced that with the image link).
I’ve tried deleting various amounts of this code to see where the error is and can’t seem to find it. It only goes away when I delete everything between the opening and closing PHP code or clear that away as well. It’s still only a local site, so I don’t have the link to the live site yet.
Here’s the code:
<?php if ( ! function_exists( 'twentythirteen_paging_nav' ) ) : /** * Displays navigation to next/previous set of posts when applicable. * * @since Twenty Thirteen 1.0 * * @return void */ function twentythirteen_paging_nav() { global $wp_query; // Don't print empty markup if there's only one page. if ( $wp_query->max_num_pages < 2 ) return; ?> <nav class="navigation paging-navigation" role="navigation"> <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1> <div class="nav-links"> <?php if ( get_next_posts_link() ) : ?> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav"><img src="/images/ArrowL.png" /></span> Older posts', 'twentythirteen' ) ); ?></div> <?php endif; ?> <?php if ( get_previous_posts_link() ) : ?> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav"><img src="/images/ArrowR.png" /></span>', 'twentythirteen' ) ); ?></div> <?php endif; ?> </div><!-- .nav-links --> </nav><!-- .navigation --> <?php } endif; if ( ! function_exists( 'twentythirteen_post_nav' ) ) : /** * Displays navigation to next/previous post when applicable. * * @since Twenty Thirteen 1.0 * * @return void */ function twentythirteen_post_nav() { global $post; // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; ?> <nav class="navigation post-navigation" role="navigation"> <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1> <div class="nav-links"> <?php previous_post_link( '%link', _x( '<span class="meta-nav"><img src="/images/ArrowL.png" /></span> %title', 'Previous post link', 'twentythirteen' ) ); ?> <?php next_post_link( '%link', _x( '%title <span class="meta-nav"><img src="/images/ArrowR.png" /></span>', 'Next post link', 'twentythirteen' ) ); ?> </div><!-- .nav-links --> </nav><!-- .navigation --> ?>
Anyway, thanks for whatever advice you can give. I’m probably missing something obvious.
Forum: Fixing WordPress
In reply to: Loop with 2 divs (firstpost and post), can't separate thumbnailsThank you for the help vtxyzzy, it worked great!
Forum: Fixing WordPress
In reply to: Loop with 2 divs (firstpost and post), can't separate thumbnailsSorry about that…completely missed the fact that it didn’t paste. That’s what happens when doing too many things at once. Anyway, here’s a link to the code at pastebin. Link to Code
Forum: Fixing WordPress
In reply to: Website flagged as having malware.Well, it was only in the index.php file. Everything’s been cleaned up and it’s working fine. Thx again for the replies.
Forum: Fixing WordPress
In reply to: Website flagged as having malware.Thank you for your quick responses. I had a local template at my home and have deleted the one with the iframe coding and uploaded a new one. I’ve installed and activated these plugins:
-
Wordpress Firewall 1.25
WP Security Scan 2.4
AskApache Password Protect 4.6.5
and finally, Akismet 2.2.3Someone mentioned in the other posts about the database, so I’m going to check that later today and make sure it wasn’t compromised as well.