Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rocket domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php on line 6114

Warning: Cannot modify header information - headers already sent by (output started at /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php:6114) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php:6114) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php:6114) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php:6114) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php:6114) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php:6114) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php:6114) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/functions.php:6114) in /home/teamikci/subdomain/apsaraaruna.dev/wp-includes/rest-api/class-wp-rest-server.php on line 1893
{"id":85,"date":"2022-11-11T23:38:55","date_gmt":"2022-11-11T18:08:55","guid":{"rendered":"https:\/\/apsaraaruna.com\/?p=85"},"modified":"2022-11-12T01:07:31","modified_gmt":"2022-11-11T19:37:31","slug":"customize-the-wp-pagenavi-html-structure","status":"publish","type":"post","link":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/","title":{"rendered":"Customize the WP-PageNavi HTML structure"},"content":{"rendered":"\n

This code will help you to customize WP-PageNavi<\/a> pagination html structure. <\/p>\n\n\n\n

Example -1: Using this you can wrap a<\/code> and span<\/code> with li<\/code> <\/p>\n\n\n\n

<?php\nadd_filter( 'wp_pagenavi', 'ap_pagination', 10, 2 );\n \n\/\/ customize the PageNavi HTML before it is output\nfunction ap_pagination($html) {\n\t$out = '';\n\t\/\/wrap a's and span's in li's\n\t$out = str_replace("<a","<li><a",$html);    \n\t$out = str_replace("<\/a>","<\/a><\/li>",$out);\n\t$out = str_replace("<span","<li><a",$out);   \n\t$out = str_replace("<\/span>","<\/a><\/li>",$out);\n\t$out = str_replace("<div class='wp-pagenavi'>","",$out);\n\t$out = str_replace("<\/div>","",$out);\n \n\treturn '<ul>'.$out.'<\/ul> ';\n}\n?><\/code><\/pre><\/div>\n\n\n\n

Example 2: Add extra attribute to pagination link<\/p>\n\n\n\n

<\/p>\n\n\n\n

add_filter('wp_pagenavi', 'ap_pagination', 10, 2);\nfunction ap_pagination($html)\n{\n  $out = '';\n  $out = str_replace("<a", "<a rel='canonical' ", $html);\n\n  return  $out;\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"

This code will help you to customize WP-PageNavi pagination html structure. Example -1: Using this you can wrap a and span with li Example 2: Add extra attribute to pagination link<\/p>\n","protected":false},"author":1,"featured_media":92,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-85","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"yoast_head":"\nCustomize the WP-PageNavi HTML structure - Apsara Aruna<\/title>\n<meta name=\"description\" content=\"wordpress wp-pagenavi plugin pagination html structure customize without overriding plugin. use plugin hooks for override\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Customize the WP-PageNavi HTML structure - Apsara Aruna\" \/>\n<meta property=\"og:description\" content=\"wordpress wp-pagenavi plugin pagination html structure customize without overriding plugin. use plugin hooks for override\" \/>\n<meta property=\"og:url\" content=\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/\" \/>\n<meta property=\"og:site_name\" content=\"Apsara Aruna\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/apsaraaruna\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-11T18:08:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-11T19:37:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/apsaraaruna\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/apsaraaruna.dev\/#\/schema\/person\/4db07772ed21534007c4c7c37089d93b\"},\"headline\":\"Customize the WP-PageNavi HTML structure\",\"datePublished\":\"2022-11-11T18:08:55+00:00\",\"dateModified\":\"2022-11-11T19:37:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/\"},\"wordCount\":32,\"publisher\":{\"@id\":\"https:\/\/apsaraaruna.dev\/#\/schema\/person\/b7f19eb32907c2a0fa41b275afe085a9\"},\"image\":{\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png\",\"articleSection\":[\"Wordpress\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/\",\"url\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/\",\"name\":\"Customize the WP-PageNavi HTML structure - Apsara Aruna\",\"isPartOf\":{\"@id\":\"https:\/\/apsaraaruna.dev\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png\",\"datePublished\":\"2022-11-11T18:08:55+00:00\",\"dateModified\":\"2022-11-11T19:37:31+00:00\",\"description\":\"wordpress wp-pagenavi plugin pagination html structure customize without overriding plugin. use plugin hooks for override\",\"breadcrumb\":{\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#primaryimage\",\"url\":\"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png\",\"contentUrl\":\"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png\",\"width\":1920,\"height\":1080,\"caption\":\"apsara aruna wordpress\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/apsaraaruna.dev\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Customize the WP-PageNavi HTML structure\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/apsaraaruna.dev\/#website\",\"url\":\"https:\/\/apsaraaruna.dev\/\",\"name\":\"Apsara Aruna\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/apsaraaruna.dev\/#\/schema\/person\/b7f19eb32907c2a0fa41b275afe085a9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/apsaraaruna.dev\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/apsaraaruna.dev\/#\/schema\/person\/b7f19eb32907c2a0fa41b275afe085a9\",\"name\":\"Apsara Aruna\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/apsaraaruna.dev\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/08\/ap-logo.png\",\"contentUrl\":\"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/08\/ap-logo.png\",\"width\":324,\"height\":282,\"caption\":\"Apsara Aruna\"},\"logo\":{\"@id\":\"https:\/\/apsaraaruna.dev\/#\/schema\/person\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/apsaraaruna.dev\/#\/schema\/person\/4db07772ed21534007c4c7c37089d93b\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/apsaraaruna.dev\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/424761d0553fa53b05263e1654d6414a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/424761d0553fa53b05263e1654d6414a?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/apsaraaruna.com\",\"https:\/\/www.facebook.com\/apsaraaruna\",\"https:\/\/www.instagram.com\/apsaraaruna\/\",\"https:\/\/www.linkedin.com\/in\/apsaraaruna\",\"https:\/\/www.pinterest.com\/apsaraaruna\",\"https:\/\/x.com\/https:\/\/twitter.com\/apsaraaruna\",\"https:\/\/www.youtube.com\/apsaraaruna\",\"https:\/\/commons.wikimedia.org\/wiki\/User:Apsaraaruna\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Customize the WP-PageNavi HTML structure - Apsara Aruna","description":"wordpress wp-pagenavi plugin pagination html structure customize without overriding plugin. use plugin hooks for override","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/","og_locale":"en_US","og_type":"article","og_title":"Customize the WP-PageNavi HTML structure - Apsara Aruna","og_description":"wordpress wp-pagenavi plugin pagination html structure customize without overriding plugin. use plugin hooks for override","og_url":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/","og_site_name":"Apsara Aruna","article_author":"https:\/\/www.facebook.com\/apsaraaruna","article_published_time":"2022-11-11T18:08:55+00:00","article_modified_time":"2022-11-11T19:37:31+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/apsaraaruna","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#article","isPartOf":{"@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/"},"author":{"name":"admin","@id":"https:\/\/apsaraaruna.dev\/#\/schema\/person\/4db07772ed21534007c4c7c37089d93b"},"headline":"Customize the WP-PageNavi HTML structure","datePublished":"2022-11-11T18:08:55+00:00","dateModified":"2022-11-11T19:37:31+00:00","mainEntityOfPage":{"@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/"},"wordCount":32,"publisher":{"@id":"https:\/\/apsaraaruna.dev\/#\/schema\/person\/b7f19eb32907c2a0fa41b275afe085a9"},"image":{"@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#primaryimage"},"thumbnailUrl":"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png","articleSection":["Wordpress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/","url":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/","name":"Customize the WP-PageNavi HTML structure - Apsara Aruna","isPartOf":{"@id":"https:\/\/apsaraaruna.dev\/#website"},"primaryImageOfPage":{"@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#primaryimage"},"image":{"@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#primaryimage"},"thumbnailUrl":"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png","datePublished":"2022-11-11T18:08:55+00:00","dateModified":"2022-11-11T19:37:31+00:00","description":"wordpress wp-pagenavi plugin pagination html structure customize without overriding plugin. use plugin hooks for override","breadcrumb":{"@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#primaryimage","url":"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png","contentUrl":"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/11\/apsaraaruna.com-1.png","width":1920,"height":1080,"caption":"apsara aruna wordpress"},{"@type":"BreadcrumbList","@id":"https:\/\/apsaraaruna.dev\/wordpress\/customize-the-wp-pagenavi-html-structure\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/apsaraaruna.dev\/"},{"@type":"ListItem","position":2,"name":"Customize the WP-PageNavi HTML structure"}]},{"@type":"WebSite","@id":"https:\/\/apsaraaruna.dev\/#website","url":"https:\/\/apsaraaruna.dev\/","name":"Apsara Aruna","description":"","publisher":{"@id":"https:\/\/apsaraaruna.dev\/#\/schema\/person\/b7f19eb32907c2a0fa41b275afe085a9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/apsaraaruna.dev\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/apsaraaruna.dev\/#\/schema\/person\/b7f19eb32907c2a0fa41b275afe085a9","name":"Apsara Aruna","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/apsaraaruna.dev\/#\/schema\/person\/image\/","url":"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/08\/ap-logo.png","contentUrl":"https:\/\/apsaraaruna.dev\/wp-content\/uploads\/2022\/08\/ap-logo.png","width":324,"height":282,"caption":"Apsara Aruna"},"logo":{"@id":"https:\/\/apsaraaruna.dev\/#\/schema\/person\/image\/"}},{"@type":"Person","@id":"https:\/\/apsaraaruna.dev\/#\/schema\/person\/4db07772ed21534007c4c7c37089d93b","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/apsaraaruna.dev\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/424761d0553fa53b05263e1654d6414a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/424761d0553fa53b05263e1654d6414a?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/apsaraaruna.com","https:\/\/www.facebook.com\/apsaraaruna","https:\/\/www.instagram.com\/apsaraaruna\/","https:\/\/www.linkedin.com\/in\/apsaraaruna","https:\/\/www.pinterest.com\/apsaraaruna","https:\/\/x.com\/https:\/\/twitter.com\/apsaraaruna","https:\/\/www.youtube.com\/apsaraaruna","https:\/\/commons.wikimedia.org\/wiki\/User:Apsaraaruna"]}]}},"_links":{"self":[{"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":3,"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":90,"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/posts\/85\/revisions\/90"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/media\/92"}],"wp:attachment":[{"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apsaraaruna.dev\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}