Replace a piece of code in widget using hooks
-
Hi, I’m totally new with hooks in WP so I am probably asking for something simple, but in the vast amount of information on hooks on the internet I just can seem to find what I’m looking for. What I’m trying to do is simply replace a piece of code within a php file that comes with the theme.
I want to replace this:
<?php if ( $show_popular_posts ) : ?> <li><a href="#tab-popular"><?php esc_attr_e( 'Popular', 'Avada' ); ?></a></li> <?php endif; ?> <?php if ( $show_recent_posts ) : ?> <li><a href="#tab-recent"><?php esc_attr_e( 'Recent', 'Avada' ); ?></a></li> <?php endif; ?>
with this:
<?php if ( $show_recent_posts ) : ?> <li><a href="#tab-recent"><?php esc_attr_e( 'Recent', 'Avada' ); ?></a></li> <?php endif; ?> <?php if ( $show_popular_posts ) : ?> <li><a href="#tab-popular"><?php esc_attr_e( 'Popular', 'Avada' ); ?></a></li> <?php endif; ?>
How can I make this specific for just one particular PHP file?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Replace a piece of code in widget using hooks’ is closed to new replies.