You can use this inside your is_page()
conditional :
elseif ( is_page() ) {
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
echo $page_title . ' ' . $paged . ' of '.$wp_query->max_num_pages;
}
The other way to achieve the same thing. The conditional statement serves to avoid adding a 0 besides the title at the first page :
elseif ( is_page() ) {
global $paged;
if ( $paged != 0 ) {
$custom_title = $page_title . ' Page Number : ' . $paged;
echo $custom_title;
} else {
echo $page_title;
}
}
Related Posts:
- How to customize search result page title?
- Parent category as WOOCommerce Categories widget title
- I want to customize the_posts_navigation function by replacing prev and next with images
- Display random categories on the front page (Finding and Editing Theme Functions)
- paginate_links() don’t properly work in search.php?
- Is it possible to remove the “standard” post format?
- How to paginate the get_users function?
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- How to style current page number (wp_link_pages)?
- Removing Unnecessary Text from Admin Menu without CSS
- Set default options for inserting media
- Default or Preset Content for Custom Post Types
- Breadcrumb how i can display page title with parent > child title with permalink ? any Idea
- Remove tag on my RSS Feed
- Display WordPress Search
- How to add a rel attribute to images that contains their categories?
- Preferred Use of home_url()?
- Custom function for user register in wp?
- Customize “the_posts_pagination” and put list instead div
- Delete pages and Create default pages for all new network sites
- Actions according to image type and size
- Post thumbnail relative link and HTML modify
- Find first image on paginated post for Pinterest
- Post Pagination Showing Same Posts Every Page
- Refactor create_function
- How would go about if I just want a temporary function?
- Remove the deleted users avatar from list
- Generating rel=prev and rel=next only on wordpress categories
- How to call custom function from functions.php in site-wide template files?
- Customizer field value into functions.php variable
- str_replace function in theme
- Shortcode pagination not advancing
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- Right way to update widget on dynamic new input field
- How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?
- Hard-coding custom menu elements for menu manager
- Twentyten Child Theme: header images display messed up in admin panel
- IF Statement on Button to make it complete and “uncomplete” based on user action / click
- Gravity Forms Button Text
- Find resources dynamically loading and change or add to the url
- Is possible add icon in title posts only in specific tag?
- When sale price is 0.00 show only regular price
- Unable to login using username
- Word Press – Dynamic Content [closed]
- get_next_posts_link not working without parameter max_num_pages
- Insert image in WordPress with HTML5 tag and caption function
- how can I just add to parent theme function(s) instead of redeclaring whole the function
- Move Custom Fields on General Settings Page to New Location
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- paginate_links() don’t properly work in search.php?
- the_posts_pagination() function returns missing page numbering on some blog pages
- How to retrieve the current post’s generated featured image size?
- Custom Behavior when Adding New Custom Post Type in Dashboard
- Why There Is No “get content by ID” Function
- Custom HTML markup
- Custom Query Not Paginating
- Use a shortcode to display custom meta box contents
- Create custom function for hero image
- Randomizing wp_tag_cloud() in child theme
- How to append classname to body tag if guest user
- Where do I go to edit this area? [closed]
- Replace plugin function with a custom function?
- add_theme_support( ‘title_tag’ ) is not showing title on index.php
- Function to replace comment’s accented characters before posting
- New checkbox in custom widget isn’t saving data
- Linking Javascript in functions.php file
- Unable to Change “Pages:” Before WP_LINK_PAGES
- Change Page Title
- How to replace ACTION url from original wordpress login form?
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- Modifying a WordPress Plugin
- Hide author info in single posts by certain users
- External api call and make global variable for any page visitor enters , page-home, page, single etc
- CSS style and app.js not loading
- How do I make a custom “Read More Blogs” button for my blog page
- How would I correctly implement a new if statement in a child functions file?
- Remove all video attachment, both files and post/postmeta from database?
- Shortcode with pagination advancing multiple queries
- True email confirmation for registration (keeping unvalidated users from user table)
- How To Show Shortcodes In WordPress Custom Fields?
- How to disable site title and description when custom header is uploaded on the customizer?
- How to make an If Else on Excerpt Filter
- Pagination in Search result
- Changing the color of post title [closed]
- Force changing the Site Title and add link
- Get Value of Custom Field
- restrict access to specific urls on a specific period of time
- How to request login for user but not for bots
- functions.php / replacing div’s with new ones?
- Adding pagination to custom WordPress function
- Post variables not displaying correctly in custom function
- How do I add functionality to images?
- WordPress is adding pagination for all pages not only for blog page, How to remove pagination for all pages except blog/posts page?
- Problem with removing characters “<” – WpAllImport
- How to crop image in WordPress with aspect ratio for any size of image
- multible shortcodes (for differnt values) with one function
- Customizer cuistom CSS Priority ordre Issue
- Copy and Modified WooCommerce function is_coupon_valid [closed]