change "continue reading" and "older post" text without loosing functions.php
-
to change “continue reading” and “older posts” text in homepage is needed to edit functions.php and those settings on theme’s update will be lost.
I tried with no luck to remove it with remove_action and put it on a child functions.php, always gives me an error. can you guide me to change them correctly?
here’s what I tried:
function dequeue_bavotasan_styles() { remove_action( 'wp_head', 'bavotasan_styles' ); } add_action('after_setup_theme', 'dequeue_bavotasan_styles'); function altered_bavotasan_front_page_render() { global $wp_query, $paged; ?> <?php while ( have_posts() ) : the_post(); ?> <?php if ( is_front_page() ) { ?> <div class="item"> <figure class="effect-julia"> <?php if ( has_post_thumbnail() ) the_post_thumbnail( 'home' ); else echo '<img src="' . BAVOTASAN_THEME_URL . '/library/images/no-image.jpg" alt="" />'; ?> <figcaption> <h2><?php the_title(); ?></h2> <div> <p><?php echo wp_trim_words( strip_shortcodes( get_the_excerpt() ) , 10 ); ?></p> <p class="more-link-p"><?php _e( 'Cooontinue reading <span class="meta-nav">→</span>', 'destin' ); ?></p> </div> <a href="<?php the_permalink(); ?>"><?php _e( 'Viooooew more', 'destin' ); ?></a> </figcaption> </figure> </div> <?php } else { ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php } ?> <?php endwhile; ?> <?php } add_action( 'wp_head', 'altered_bavotasan_styles' );
and it say “Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘altered_bavotasan_styles’ was given in /web/htdocs/www.crea11.it/home/studiocrea/wp-includes/plugin.php on line 496”
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘change "continue reading" and "older post" text without loosing functions.php’ is closed to new replies.