Forum

Thread tagged as: Question

Remove Author name fro mthe bottom of blog posts

Hi Rachel, Drew, I'm trying to locate where the author name is added to the bottom of blog posts (so I can delete it)

I've looked in all the templates flagged by debug but still no joy. Debug Message and Summary diagnostic below

Debug Message
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='morbi-ut-nisi-ipsum')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2016-06-30 10:59:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
[33] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] Using template: /templates/blog/meta_head.html
[1] SELECT * FROM perch2_blog_authors ORDER BY authorFamilyName, authorGivenName ASC
[4] SELECT * FROM perch2_blog_sections ORDER BY sectionTitle ASC
[1] SELECT * FROM perch2_blogs ORDER BY blogTitle ASC
[33] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Using template: /templates/search/search-form.html
[6] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageDepth >=0 AND pageDepth<=1 ORDER BY pageTreePosition ASC
[0] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/stories/post.php' LIMIT 1
[6] Using template: /templates/navigation/item.html
Using template: /templates/search/search-form.html
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='morbi-ut-nisi-ipsum')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2016-06-30 11:00:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/blog/posts/stories.html
Fetching from cache: perch_blog_author_for_post1179eb13c85a9d980b1a95f6d1653dbd
Fetching from cache: perch_blog_post_categories2066ba05e9a4e12e8ed54066dcdec0f9
Cache file not found: perch_blog_post_categories2066ba05e9a4e12e8ed54066dcdec0f9
[1] SELECT * FROM perch2_blog_posts WHERE postStatus='Published' AND postDateTime<='2016-06-30 11:00:00' AND postSlug='morbi-ut-nisi-ipsum'
[] Using template: /templates/blog/post_category_link.html
Fetching from cache: perch_blog_post_tags02ad91f1901caea4dfc2c7dd39424437
Cache file not found: perch_blog_post_tags02ad91f1901caea4dfc2c7dd39424437
[nil] SELECT t.* FROM perch2_blog_tags t, perch2_blog_posts_to_tags p2t WHERE t.tagID=p2t.tagID AND p2t.postID='11'
[] Using template: /templates/blog/post_tag_link.html
Summary information
    Perch: 2.8.30, PHP: 5.5.37, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $, with PDO
    Server OS: Linux, cgi-fcgi
    Installed apps: content (2.8.30), assets (2.8.30), categories (2.8.30), perch_blog (5.0), perch_forms (1.8.3), perch_newsfeed (1), perch_backup (1.2), perch_twitter (3.5.1)
    App runtimes: <?php $apps_list = array( 'content', 'categories', //'perch_backup', 'perch_blog', 'perch_forms', //'perch_newsfeed', 'perch_twitter', );
    PERCH_LOGINPATH: /admin
    PERCH_PATH: /home/sites/loatdavies.com/public_html/dev/headycommunications/admin
    PERCH_CORE: /home/sites/loatdavies.com/public_html/dev/headycommunications/admin/core
    PERCH_RESFILEPATH: /home/sites/loatdavies.com/public_html/dev/headycommunications/admin/resources
    Image manipulation: GD
    PHP limits: Max upload 64M, Max POST 64M, Memory: 128M, Total max file upload: 64M
    F1: 2edba60ed1f613d6dd804feb202456a2
    Resource folder writeable: Yes
    HTTP_HOST: hc.loatdavies.com
    DOCUMENT_ROOT: /home/sites/loatdavies.com/public_html/dev/headycommunications/
    REQUEST_URI: /admin/core/settings/diagnostics/
    SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
Nick Loat

Nick Loat 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2617 points
Perch Support

Is your post template /templates/blog/posts/stories.html ?

Yes. The blog is set up in 4 sections. stories is one of them.

Drew McLellan

Drew McLellan 2617 points
Perch Support

What's in that template?

It's pretty close to the standard post.html template (just with a few things moved around)


<h1> <a href="<perch:blog id="postURL" type="hidden" />" rel="bookmark" class="p-name"> <perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" /> </a> </h1> <article class="h-entry content <perch:blog id="imgtype" type="select" label="Image type" options="No img|no-img, Landscape|l-img, Portrait|p-img, Square|s-img" allowempty="false" required="true" />"> <h2><perch:blog id="excerpt" type="textarea" label="Excerpt" markitup="true" html="false" order="3" size="s" count="words"/></h2> <p class="meta"> <time class="dt-published" datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Publishing" />"> Published on <span><perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y" /> </span><br/> </time> <perch:if exists="authorGivenName"> by <span class="p-author h-card"><perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" /></span> </perch:if> <perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes"> <a href="archive.php?cat=<perch:category id="catSlug" type="slug" />" class="p-category"> <perch:category id="catTitle" type="text" /> </a> </perch:categories> </p> <perch:if exists="image"> <div> <img src="<perch:blog id="image" type="image" width="320" height="240" crop="true" label="Image" order="4" />" alt="<perch:blog id="postTitle" />" /> </div> </perch:if> <div class="description e-content"> <perch:blog id="postDescHTML" type="textarea" label="Post" order="2" editor="markitup" markdown="true" size="xxl autowidth" required="true" /> </div> </article> <perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />
Drew McLellan

Drew McLellan 2617 points
Perch Support

Ok, so remove the tags for authorGivenName, authorFamilyName etc.

Drew, deleting that only removes it from the top of the post (where the publish date is) the name at the bottom of the page stubbornly remains. Somehow it seems to be part of the post content.

see (hopefully it should display OK - its a work in progress!),

http://hc.loatdavies.com/stories/post.php?s=morbi-ut-nisi-ipsum

Drew McLellan

Drew McLellan 2617 points
Perch Support

Are you calling perch_blog_author_for_post() on your page?

Genius! Found it. It's so annoying when you miss something so blindingly obvious! Many thanks for your help it would probably have taken me the rest of the afternoon to stumble across it. As always many thanks.