Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2017-07-03 06:36:44

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Pangolin and WP 4.8

Hello,

I created a new pangolin theme for WP and also updated to WP 4.8.

The switch "Hide Featured Image on Single Post" in WordPress seems to have no effect with my pangolin theme.

Can this be adressed by use of a child theme?

Yours, Michael

Offline

#2 2017-07-03 08:06:33

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Pangolin and WP 4.8

I'm seeing the same thing. The featured image is appearing in the post even when "Hide Featured Image on Single Post" is checked in the post.
For example: http://pangolin.barbeephoto.com/blog/pa … test-post/

This could be addressed with a child theme (if you knew what code to add) but it makes more sense to let Matt look into why it's not working as expected.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2017-07-03 09:40:49

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Pangolin and WP 4.8

Good find. This worked last time I checked it; not sure at what point it got broken, but these things happen. I've got this fixed for the next update to the Wordpress Add-on.

In the meantime, you can patch the add-on yourself with these files:
http://files.theturninggate.net/WP-Fix- … -Image.zip

Unzip, then copy the files to:

backlight/modules/pangolin-wordpress/dynamic/view/inc/theme_posts.php
backlight/modules/pangolin-wordpress/dynamic/view/template-parts/content.php

You'll know you're in the right place, because you'll be overwriting existing files.


Matt

The Turning Gate, http://theturninggate.net

Offline

#4 2017-07-04 05:10:25

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Pangolin and WP 4.8

Hi,

I uploaded the patch and it works here. Thank You.
I had to visit the customizer to set the visibility of the featured image in single post pages to hidden and unceck the option for the particular post. Hiding it  in the editor for a particular post would make it invisible on the excerpts page too.

Another thing I found is in the footer of the WP post. The links to the categories and tags of the post does not have the usual icons before each entry.

In theme-posts.php I believe I found the place where the lists are bult in function post_entry_footer(). The classes "screen-reader-text", "cat-list", "tags-list" are being applied in this function.
"screen-reader-text" is defined in style.css, but the other two are undefined.

An example is here:
https://fotos.michilge.de/blog/sc-pader … hoevel-21/

Last question for now: is function post_entry_footer() also the place where I might insert social media sharing links into the post (in a child theme of course)?

Bye for now
Michael

Offline

#5 2017-07-04 06:56:34

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Pangolin and WP 4.8

you can place social sharing icons in the footer via phplugins associated with the page template you're using for your WordPress theme.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#6 2017-07-04 08:06:32

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Pangolin and WP 4.8

And here's a way to do it: http://ttg-tips-and-tricks.barbeephoto. … -pangolin/
(Based on Backlight 1.1.1 code directly copied from my current 1.1.1 site)


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2017-07-04 08:49:29

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Pangolin and WP 4.8

michilge wrote:

... I had to visit the customizer to set the visibility of the featured image in single post pages to hidden and unceck the option for the particular post. Hiding it  in the editor for a particular post would make it invisible on the excerpts page too ...

Right, that's me being stupid. I need to only run the check on single pages, and not run it on archives and excerpts. Sorry! I'll fix this for next update. You can make this change to the file and should work:

	$post_thumbnail_archive = has_post_thumbnail() && !$hide_post_thumbnail && get_theme_mod('post_thumbnail_excerpt', true) && ( is_archive() || is_search() );
	$post_thumbnail_content = has_post_thumbnail() && !$hide_post_thumbnail && get_theme_mod('post_thumbnail_content', true) && is_single();
	$post_thumbnail_excerpt = has_post_thumbnail() && !$hide_post_thumbnail && get_theme_mod('post_thumbnail_excerpt', true) && is_home();

To:

	$post_thumbnail_archive = has_post_thumbnail() && get_theme_mod('post_thumbnail_excerpt', true) && ( is_archive() || is_search() );
	$post_thumbnail_content = has_post_thumbnail() && !$hide_post_thumbnail && get_theme_mod('post_thumbnail_content', true) && is_single();
	$post_thumbnail_excerpt = has_post_thumbnail() && get_theme_mod('post_thumbnail_excerpt', true) && is_home();

Matt

The Turning Gate, http://theturninggate.net

Offline

#8 2017-07-04 08:52:56

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Pangolin and WP 4.8

michilge wrote:

Another thing I found is in the footer of the WP post. The links to the categories and tags of the post does not have the usual icons before each entry.

I've noticed this as well. It's on my to-do list to remedy in one way or another today.


Matt

The Turning Gate, http://theturninggate.net

Offline

#9 2017-07-04 15:29:07

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Pangolin and WP 4.8

rod barbee wrote:

Thank you for sharing the tips.

I was looking forward to your how-to and I will certainly follow it. But I would also like to have sharing links in the immediate context of the post that shares a link to that particular post. I'm not sure yet, whether links in the footer might better link to the home of my site.
Might well be that I also take the custom theme path.

Offline

#10 2017-07-04 22:46:26

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Pangolin and WP 4.8

There are WordPress plugins that will add those sharing links to posts, give those a try.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#11 2017-07-05 07:15:41

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Pangolin and WP 4.8

@Matthew: I changed that and it works well.

@Rod: I tried out quite a few of those and didn't like them.
Those plugins all have the bad habit to fetch third party code from Facebook or elsewhere with every page view. This would also happen to viewers who do not want any contact with facebook or twitter.

I prefer plain and honest links that establish connection in the moment when they are actively clicked. Just the kind we used to have in CE4:

<a target= "_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Teilen</span></a>

With pangolin the theme's file /template-parts/content.php no longer contains the footer itsself but uses a "function post_entry_footer()" which is defined in /inc/theme_posts.php.

Since in that file all functions are thoroughly checked with

 if ( ! function_exists( 'post_entry_footer' ) )

I only had to create a minimal child theme and copy that function into my child-theme's functions.php and modify it to my needs.

You can see it working in a blog post here:
https://fotos.michilge.de/blog/tsg-spro … ch-u23-13/

Offline

#12 2017-07-05 09:05:38

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Pangolin and WP 4.8

michilge wrote:

in that file all functions are thoroughly checked with

 if ( ! function_exists( 'post_entry_footer' ) )

I only had to create a minimal child theme and copy that function into my child-theme's functions.php and modify it to my needs.

Aw, you noticed! Child theming is exactly why I do that. big_smile


Matt

The Turning Gate, http://theturninggate.net

Offline

#13 2017-07-05 13:59:01

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Pangolin and WP 4.8

I perhaps wouldn't have noticed if the code weren't so cleanly indented big_smile

Offline

#14 2017-07-05 16:41:03

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Pangolin and WP 4.8

Indentation keeps me sane.


Matt

The Turning Gate, http://theturninggate.net

Offline

Board footer

Powered by FluxBB