Hot answers tagged

16

Here's a way to support pagination titles of the form: <!--nextpage(.*?)?--> in a simlar way as the core supports <!--more(.*?)?-->. Here's an example: <!--nextpage Planets --> Let's talk about the Planets <!--nextpage Mercury --> Exotic Mercury <!--nextpage Venus--> Beautiful Venus <!--nextpage Earth --> Our Blue ...


5

You can use filter wp_link_pages_link First pass our custom string placeholder (This can be anything you like except string containing %, just for now I am using #custom_title#). wp_link_pages( array( 'pagelink' => '#custom_title#' ) ); Then add our filter in functions.php. In callback function make an array of titles then check for the current page ...


3

Here's a little coding that should implement this for you: <?php $max_length = 5; // set max character length here $next = get_next_post()->ID; $prev = get_previous_post()->ID; if( $prev ) { $title = get_the_title( $prev ); $link = get_the_permalink( $prev ); $post_name = mb_strlen( $title ) > $max_length ? mb_substr( $title, 0, ...


1

Can't this be done by css? .nav_posts .title { display: inline-block; text-overflow: ellipsis; max-width: 30ex; white-space: nowrap; overflow: hidden; } <?php previous_post_link('<span class="nav_posts left">&larr; <span class="title">%link</span></span>'); next_post_link('<span class="nav_posts ...


1

The left padding will be the default 40 pixels added to a ul by the browser. When I style WP menus I use this to make sure all browsers are happy: .blog-nav li, .blog-nav ul { padding: 0; margin: 0; }


1

You can deregister that style in your child theme functions.php function remove_shoreditch_background() { wp_deregister_style('shoreditch-style'); } add_action('wp_enqueue_scripts', 'remove_shoreditch_background'); Or you could remove that action entirely remove_action('wp_enqueue_scripts', 'shoreditch_post_nav_background'); Or you can just ...


1

If your theme fully supports child themes copy template-tags.php to the child theme folder and edit it as needed.



Only top voted, non community-wiki answers of a minimum length are eligible