- This topic has 5 replies, 3 voices, and was last updated 9 years, 5 months ago by Theme Horse Support Team.
-
AuthorPosts
-
April 16, 2015 at 8:12 am #24096christianParticipant
Hi, when I set-up a post I upload a featured image. When someone clics on the post i dont want the featured image to appear again in the post. Here is an example of what i mean: http://christianhelmut.net/brutal-truth-about-why-you-are-not-making-money-online/
1. I want the featured image to appear in the home site but not in the actual post itself. How can i do that?
2. In the live preview, below the banner a row with 3 elements appear: Elegant Design (and an image) Responsive design (and an image) HTML5 & CSS3 (and an image). How can i add those elements to my site?
Thanks a lot!
christian
April 17, 2015 at 11:21 am #24115Theme Horse Support TeamKeymasterHi christian,
We have designed our theme this way. If you don’t want featured image to display then it needs code customization. You just go to the theme folder-> inc-> structure-> content-extension.php and go to line no 276 to 287 and you will find this below code.
<?php if( has_post_thumbnail() ) { $image = ''; $title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) ); $image .= '<figure class="post-featured-image">'; $image .= '<a href="' . get_permalink() . '" title="'.the_title( '', '', false ).'">'; $image .= get_the_post_thumbnail( $post->ID, 'featured', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ) ) ).'</a>'; $image .='<span class="arrow"></span>'; $image .= '</figure>'; echo $image; } } ?>
Remove this above code and your featured image will not be displayed. Before making any changes first of all create a child theme then only customize the code to be safe from data loss while updating to our new version. If you feel its difficult then remove it from core file. But after new version update you need to do the above process again and again whenever you update.
Thank you!
April 22, 2015 at 1:50 pm #24240christianParticipantHi, how do i create a child theme?
April 23, 2015 at 5:00 am #24263Theme Horse Support TeamKeymasterHi christian,
please view this link to create a child theme
https://codex.wordpress.org/Child_ThemesThank you!
May 27, 2015 at 9:10 pm #25181DaleParticipantHello, after backing up my site and following the instructions at the link you provided, I have the child theme installed. I tried copying the content-extensions.php file into my \ultimate-pro-child\inc\structure\ folder and modifying it there (deleting lines 276 to 287) but it did not create the desired effect.
style.css:
/* Theme Name: Ultimate Pro Child Template: ultimate-pro Version: 1.0.0 Text Domain: ultimate-pro-child */
functions.php:
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('parent-style') ); } ?>
I need to know how to fit your changes into this child theme. Thanks.
May 29, 2015 at 5:40 am #25216Theme Horse Support TeamKeymasterThis is an example how to unhook page 404.php and use your own content.
unhook functions
// Unhook default Thematic functions
function unhook_thematic_functions() {
// Don’t forget the position number if the original function has oneremove_action( ‘attitude_404_content’, ‘attitude_display_404_page_content’, 10 );
}
add_action(‘init’,’unhook_thematic_functions’); // removes the header content by using hook attitude_headeradd_action( ‘attitude_404_content’, ‘attitude_child_display_404_page_content’, 10 );
/**
* function to show the footer info, copyright information
*/Hi Dale,
First of all you need to unhook the functions and then only customize the code in your child theme functions.php. Here is a simple example how to unhook functions and customize the code.
// Unhook default Thematic functions function unhook_thematic_functions() { // Don't forget the position number if the original function has one remove_action( 'attitude_404_content', 'attitude_display_404_page_content', 10 ); } add_action('init','unhook_thematic_functions'); // removes the header content by using hook attitude_header add_action( 'attitude_404_content', 'attitude_child_display_404_page_content', 10 ); /** * function to show the footer info, copyright information */ function attitude_child_display_404_page_content() { ?> <div id="content"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Error 404-Page NOT Found', 'attitude' ); ?></h1> </header> <div class="entry-content clearfix" > <p>Thank you</p> </div><!-- .entry-content --> </div><!-- #content --> <?php }
Do in this way for content-extension.php and if you are unable to fix it then you need to hire a developer to fix it.
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.