Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Blog Post Customization
New Landing › How can we help? › Atelier › Blog Post Customization
- This topic has 12 replies, 3 voices, and was last updated 9 years by Rui Guerreiro – SUPPORT.
-
Posted in: Atelier
-
May 11, 2015 at 6:19 pm #173872
I’m trying to customize blog posts. What was easy before, modify single.php, has apparently been componentized into a myriad of different templates that I can’t find.
First, I need to get rid of the HTML encoding of the blog title. I have magazine-style bold and italics in my blog titles. By the way, your posts slider doesn’t do HTML encoding of the titles so either way one or the other is a bug. I think I’m looking for the template for one of these but can’t find it:
do_action( ‘sf_post_article_start’ );
do_action( ‘sf_before_post_content’ );I also need to customize the social section. Where is it located?
I also need to insert a shortcode called from PHP for a related posts plug-in. It will go immediately below the pagination. Will that be the same template as the social section?
I also need to get rid of the Swift Framework related posts, and I don’t want to just hide it in CSS. I have it turned off in Default Meta Options, but that setting is apparently ignored.
Thank you,
TerryMay 13, 2015 at 7:10 am #174326Hi Terry,
The template content files can be found in /swift-framework. Those actions can be found in /swift-framework/layout/single-post.php
The post share function can be found in /swift-framework/content/sf-post-detail.php
The Default Meta options only affect posts which haven’t been saved since the theme was enabled, and sets the default for new posts. If you have saved a post with the meta option enabled in the past then they will still show on those posts. You can either update those posts, or remove the action:
remove_action( 'sf_post_after_article', 'sf_post_related_articles', 10 );
Hope that helps.
– Ed
May 13, 2015 at 8:58 pm #174713Thanks Ed,
I added the remove_action line to functions.php in my child theme, but the related articles are still displaying. Am I missing something?
Terry
May 13, 2015 at 10:48 pm #174726I have copied sf-post-detail.php to my child theme, in the same folder structure, and set the following after the variables have been set by the standard code:
$show_author_info = false;
$show_related = false;Some posts are still displaying these sections and some are not. What am I missing?
Thanks,
TerryMay 14, 2015 at 4:11 pm #174971Hi,
Can you provide admin credentials to check the remove_action() ?
Regarding the sf-post-detail.php, that’s a difficult file to override because it needs several includes to get to that file. It’s better to copy just the modified functions inside that file to the functions.php of the child theme.
-Rui
May 15, 2015 at 3:32 pm #175413This reply has been marked as private.May 17, 2015 at 11:20 pm #175736Hi Terry,
Multiple H1 tags actually doesn’t have any affect on SEO, from what our research has told us. For example: http://www.quora.com/Does-using-multiple-h1-tags-on-a-page-affect-search-engine-rankings
I’ve just removed the esc_attr() functions around the page title – this will keep your tags in place. This is in the next update, but can send the new build over to you sooner if needed.
Regards,
– Ed
May 18, 2015 at 1:07 am #175743Thank you for fixing the esc_attr() in the next update. The video is referring to multiple, logical H1 sections on a page, not two H1’s with identical wording at the top of the same section. Google may not penalize for that currently, but it looks like keyword spamming and is bad structure regardless.
Can you or someone else please address my other questions?
Thanks,
TerryMay 20, 2015 at 10:26 pm #177117Hi Terry,
We’ve changed the second h1 for the next update, just incase. It’s just for google structure, but not needed to be a H1.
For the remove_action – apologies, it should have been this:
remove_action( 'sf_post_after_article', 'sf_post_related_articles', 30 );
For the sharing, it’s not that section on Atelier – it’s within the sf_post_info() function (/includes/sf-theme-functions.php)
– Ed
May 21, 2015 at 4:57 am #177170Thank you for your help Ed, and double thank you for changing the second H1. I’ve overridden the sf_post_info() function and that’s getting me closer to what I need. I still have some work to do on it. The remove action for related articles is still not working though. I also turned off related articles for a post in its meta options and that didn’t work either. What am I missing?
Just so you know my goal is to turn off related articles and replaced it with the short-code for the Contextual Related Posts plug-in and then customize that further.
Thank you,
TerryMay 21, 2015 at 10:42 am #177293Hi,
Can you give it a try hooking it to the init.
add_action( 'init' , 'sf_hooks_managment' , 15 ); function sf_hooks_managment() { remove_action( 'sf_post_after_article', 'sf_post_related_articles', 30 ); }
-Rui
May 21, 2015 at 2:47 pm #177412That worked. Thank you!
May 21, 2015 at 3:15 pm #177427No problem Terry. Glad I could help.
-Rui
-
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.