{"id":2398,"date":"2016-10-17T10:38:29","date_gmt":"2016-10-17T10:38:29","guid":{"rendered":"http:\/\/docs.contentviewspro.com\/?p=2398"},"modified":"2016-10-17T10:38:29","modified_gmt":"2016-10-17T10:38:29","password":"","slug":"show-author-name-without-hyperlink","status":"publish","type":"docs","link":"https:\/\/contentviewspro.com\/documentation\/article\/show-author-name-without-hyperlink\/","title":{"rendered":"Show author name without hyperlink (disable author link)"},"content":{"rendered":"<p>Content Views helps you to show author of post easily without coding.<br \/>\nBy default, author name with hyperlink to the author page will be shown. <\/p>\n<p>To show author name without link, please add this code to file <strong>functions.php<\/strong> in the theme&#8217;s folder (or install this plugin <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" rel=\"nofollow\">Code Snippets<\/a> then add this code to <a href=\"https:\/\/ps.w.org\/code-snippets\/assets\/screenshot-2.png\" rel=\"nofollow\">the &#8220;Code&#8221; textarea<\/a>):<\/p>\n<ul>\n<li>For a single View:\n<pre style=\"font-size:13px\">\n\/\/ Content Views Pro - Author name without hyperlink\nadd_filter( 'pt_cv_field_meta_author_html', 'cvp_theme_author_no_link', 100, 2 );\nfunction cvp_theme_author_no_link( $args, $post ) {\n\tglobal $pt_cv_id;\n\tif ( $pt_cv_id === 'VIEW_ID' ) {\n\t\t$args = sprintf( '<span>%s<\/span>', get_the_author_meta( 'display_name', $post->post_author ) );\n\t}\n\n\treturn $args;\n}\n<\/pre>\n<p>(replace <strong>VIEW_ID<\/strong> with ID of the View which you want to apply).<\/li>\n<li>For all Views:\n<pre style=\"font-size:13px\">\n\/\/ Content Views Pro - Author name without hyperlink\nadd_filter( 'pt_cv_field_meta_author_html', 'cvp_theme_author_no_link_all', 100, 2 );\nfunction cvp_theme_author_no_link_all( $args, $post ) {\n    $args = sprintf( '<span>%s<\/span>', get_the_author_meta( 'display_name', $post->post_author ) );\n    return $args;\n}\n<\/pre>\n<\/li>\n<\/ul>\n<p>Best regards,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Content Views helps you to show author of post easily without coding. By default, author name with hyperlink to the author page will be shown. To show author name without link, please add this code to file functions.php in the theme&#8217;s folder (or install this plugin Code Snippets then add this code to the &#8220;Code&#8221; &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/contentviewspro.com\/documentation\/article\/show-author-name-without-hyperlink\/\"> <span class=\"screen-reader-text\">Show author name without hyperlink (disable author link)<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"doc_category":[25],"doc_tag":[32,21],"class_list":["post-2398","docs","type-docs","status-publish","hentry","doc_category-adjustment","doc_tag-author","doc_tag-custom-code"],"year_month":"2026-09","word_count":179,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"admin1","author_nicename":"admin1","author_url":"https:\/\/contentviewspro.com\/documentation\/author\/admin1\/"},"doc_category_info":[{"term_name":"Adjustment","term_url":"https:\/\/contentviewspro.com\/documentation\/cats\/adjustment\/"}],"doc_tag_info":[{"term_name":"author","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/author\/"},{"term_name":"custom PHP code","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/custom-code\/"}],"_links":{"self":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/2398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/comments?post=2398"}],"version-history":[{"count":0,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/2398\/revisions"}],"wp:attachment":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/media?parent=2398"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=2398"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=2398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}