{"id":153,"date":"2019-01-29T11:39:56","date_gmt":"2019-01-29T10:39:56","guid":{"rendered":"https:\/\/www.molongui.com\/help\/byline-template-tags\/"},"modified":"2022-02-22T17:56:15","modified_gmt":"2022-02-22T16:56:15","slug":"byline-template-tags","status":"publish","type":"post","link":"https:\/\/www.molongui.com\/help\/byline-template-tags\/","title":{"rendered":"Byline Template Tags"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"153\" class=\"elementor elementor-153\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5c55210 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5c55210\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b199436\" data-id=\"b199436\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d82c428 elementor-widget elementor-widget-text-editor\" data-id=\"d82c428\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Guest posting and co-authoring are two features that WordPress doesn&#8217;t provide. And that&#8217;s where Molongui Authorship comes in handy :)<\/p>\n<p>You reading this article might mean two things: A) You are a theme or plugin developer that want to make your masterpiece fully compatible with Molongui Authorship. B) You are a user experiencing issues with your bylines. In either case, keep reading.<\/p>\n<p>Bylines are a capital point when talking about guest posting and co-authoring. They need to display the correct author name, no matter whether it is a regular post, a guest post or a multi-authored post. Molongui Authorship hooks into WordPress core to achieve just that, but, let&#8217;s face it, sometimes it fails. There are many things going on your site (WP, theme, plugins&#8230;), from many different developers, so conflicts happen. But wait! Keep reading! It failing doesn&#8217;t mean you have to give up on our plugin.<\/p>\n<p>If you are already experiencing byline issues, please <a href=\"\/support\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"open a support ticket (opens in a new tab)\">open a support ticket<\/a> with us so we can look into it to provide a fix. Most probably there might be some sort of conflict with your theme. Thanks to other users we have already been able to make the plugin compatible with many themes and plugins.<\/p>\n<p>If you just want to make your code fully compatible with Molongui Authorship, we provide some useful template tags you can use.<\/p>\n<p>Displaying fully customized and functional bylines can be achieved using the provided template tags. It requires some basic coding skills, but using template tags is the best way to go in order to avoid issues with other plugins. Some parameters can be provided to the template tags so bylines can be fully localized and customized with custom HTML code and CSS styles.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dd38fb5 elementor-widget elementor-widget-heading\" data-id=\"dd38fb5\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Available Template Tags<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-26db37c elementor-widget elementor-widget-text-editor\" data-id=\"26db37c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>WordPress offers template tags like <code>the_author()<\/code> and <code>the_author_posts_link()<\/code> to display byline information associated with each post. You might see those inside files like <code>single.php<\/code> and <code>author.php<\/code>.<\/p>\n<p>Molongui Authorship provides similar template tags useful to display guest and multi-author bylines. They can be found into the <code>template-tags.php<\/code> file. The most relevant are:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0b03194 elementor-section-stretched elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0b03194\" data-element_type=\"section\" data-settings=\"{&quot;stretch_section&quot;:&quot;section-stretched&quot;,&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e58aee8\" data-id=\"e58aee8\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-db33c07 elementor-widget elementor-widget-code-highlight\" data-id=\"db33c07\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-php line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-php\">\n\t\t\t\t\t<xmp>\/**\n * Outputs the authors display names, without links to their archive pages.\n * This tag must be used within 'The Loop'.\n * This function is the one to use as replacement for 'the_author()' template tag.\n *\n * @param   int     $pid            Post id. Defaults to null.\n * @param   string  $separator      Delimiter that should appear between the authors.\n * @param   string  $last_separator Delimiter that should appear between the last two authors.\n * @param   string  $before         String to be prepended before the author name(s). Defaults to an empty string.\n * @param   string  $after          String to be appended after the author name(s). Defaults to an empty string.\n * @return  void                    Displays the byline.\n *\/\nfunction the_molongui_author( $pid = null, $separator = ', ', $last_separator = '', $before = '', $after = '' )\n{\n   echo get_the_molongui_author( $pid, $separator, $last_separator, $before, $after );\n}\n\n\/**\n * Outputs the authors display names, with links to their archive pages.\n * This tag must be used within 'The Loop'.\n * This function is the one to use as replacement for 'the_author_posts_link()' template tag.\n *\n * @param   int     $pid            Post id. Defaults to null.\n * @param   string  $separator      Delimiter that should appear between the authors.\n * @param   string  $last_separator Delimiter that should appear between the last two authors.\n * @param   string  $before         String to be prepended before the author name(s). Defaults to an empty string.\n * @param   string  $after          String to be appended after the author name(s). Defaults to an empty string.\n * @return  void                    Displays the byline with linked names.\n *\/\nfunction the_molongui_author_posts_link( $pid = null, $separator = ', ', $last_separator = '', $before = '', $after = '' )\n{\n   echo get_the_molongui_author_posts_link( $pid, $separator, $last_separator, $before, $after );\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-35ea0be elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"35ea0be\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-694b122\" data-id=\"694b122\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3870c41 elementor-widget elementor-widget-text-editor\" data-id=\"3870c41\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>First template tag displays just the author names(s). The second, the author name(s) as a link each author archive page.<\/p>\n<p>Check out <a href=\"https:\/\/www.molongui.com\/docs\/molongui-authorship\/howto\/how-to-incorporate-molongui-authorship-template-tags-into-your-theme\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"this support article (opens in a new tab)\">this support article<\/a> to get some examples on how to integrate these template tags in your theme.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Guest posting and co-authoring are two features that WordPress doesn&#8217;t provide. And that&#8217;s where Molongui Authorship comes in handy :) You reading this article might mean two things: A) You are a theme or plugin developer that want to make your masterpiece fully compatible with Molongui Authorship. B) You are a user experiencing issues with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,1],"tags":[33,11],"class_list":["post-153","post","type-post","status-publish","format-standard","hentry","category-authorship","category-doc","tag-byline","tag-feature"],"_links":{"self":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/comments?post=153"}],"version-history":[{"count":4,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/153\/revisions"}],"predecessor-version":[{"id":1745,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/153\/revisions\/1745"}],"wp:attachment":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/media?parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/categories?post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/tags?post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}