Where is the show_authors() function defined? I would like to review the code and write a mod.
I found where the function is called (td-standard-pack/Newspaper/loop-single.php) and I can successfully display multiple authors there using this PublishPress shortcode:
[publishpress_authors_data field=”display_name”]
I would like to have the above shortcode called from within show_authors() so I can use a filter/hook to modify the output from the functions.php file or with a code snippet. Anyone know where to find show_author()?
I am using the Newspaper theme.
Thanks!
Hi,
You can use singlecloud templates, and in this way, you can add the shortcode to the single post template using the column text element.
A shortcode can be inserted by using the element called “Column text” or “Text with title”. “Column text” and “text with title” elements have a button called “edit content” and if you click on that button, the WP Editor will open, and you can add some text/code/shortcode there. Close the WP Editor from X, save the changes from Composer and view the page to see the changes.
If you want to use template from theme panel, then you need to edit the template that is used for the template and set it in the child theme.
Thank you!
I am still working on this. I do not understand your instructions. Please tell me where in the Newspaper Theme code (what line # on what exact file) the show_authors() function is defined. I would like to use that specific code as the base of a new/updated function in functions.php to handle displaying multiple authors on posts.
I tried using a cloud template, but the author area was still not editable. I do not want to just add two authors to the sidebar or body of the posts. I want to have multiple authors display beneath the [Title] and before the [Date] – where WordPress normally displays them.
Is this request clear? The file and line where show_authors() is defined, pls.
Hi,
You do not need to modify the code. Please check this guide -> https://forum.tagdiv.com/adding-multiple-authors-articles/
Thank you!
Hi.
I am not using that plugin. I am using the PublishPress Authors plugin and do not wish to rebuild my author library just so I can follow your guide. Please just tell me where I can find the code for the show_authors() function.
Perhaps one of your programmers might know?
Thank you.
Hi,
The plugin you use provided a shortcode https://publishpress.com/knowledge-base/shortcodes/, so you can add that shortcode in the single post template, as I said above.
Thank you!