- This topic has 10 replies, 2 voices, and was last updated 4 years, 3 months ago by Theme Horse Support Team.
-
AuthorPosts
-
August 17, 2020 at 3:54 pm #80237johnParticipant
I want my post title to appear above my featured image. I don’t want it appearing below my featured image. (News card pro)
August 20, 2020 at 2:26 pm #80319Theme Horse Support TeamKeymasterHi john,
Please go to “Theme Directory > template-parts > content.php”
1- On line no: 52 you will find the below code.
<?php if ( !has_post_format( 'quote' ) ) { // for not format quote ?>
replace it with below code.
<?php if ( !has_post_format( 'quote' ) && !is_single() ) { // for not format quote ?>
2- Remove the below mentioned code from line no: 38 to 40.
<div class="entry-meta category-meta"> <div class="cat-links"><?php echo esc_html( newscard_post_categories_display() ); ?></div> </div><!-- .entry-meta -->
3- Add the below Custom Code on line no: 16.
<?php if ( !has_post_format( 'quote' ) && is_single() ) { // for not format quote ?> <div class="entry-meta category-meta"> <div class="cat-links"><?php echo esc_html( newscard_post_categories_display() ); ?></div> </div><!-- .entry-meta --> <header class="entry-header"> <?php if ( is_singular() ) { the_title( '<h1 class="entry-title">', '</h1>' ); } else { the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); } ?> <?php if ( 'post' === get_post_type() ) { if ( !has_post_format( 'link' ) ){ // for not format link ?> <div class="entry-meta"> <?php newscard_posted_on(); ?> <?php if ( comments_open() && get_comments_number() ) { ?> <div class="comments"> <?php comments_popup_link( __('No Comments', 'newscard'), __('1 Comment', 'newscard'), __('% Comments', 'newscard'), '', __('Comments Off', 'newscard') ); ?> </div><!-- .comments --> <?php } ?> </div><!-- .entry-meta --> <?php } } ?> </header> <?php } ?>
NOTE: Please make the Child Theme before customizing the Theme Code so that you won’t loose the Customized Code when updating the Theme to a New Version in future.
Thanks
August 22, 2020 at 5:25 pm #80406johnParticipantPlease the code line numbers you are giving does not correspond with mine for example Line 60
<div class=”entry-meta category-meta”>
<div class=”cat-links”><?php echo esc_html( newscard_post_categories_display() ); ?></div>
</div><!– .entry-meta –>is at line 46 on my theme (News card pro)
Kindly crosscheck your numbering please. Thank youAugust 22, 2020 at 6:51 pm #80410johnParticipantThis query has been on for more thank 1 week now’
Please Assist me soonest Thank you.August 23, 2020 at 11:13 am #80412Theme Horse Support TeamKeymasterSorry we traced the line no: after adding the codes. We have Updated the Line no. Please copy the previous codes of respective line no again.
Thanks
August 23, 2020 at 1:46 pm #80419johnParticipantI have done that but no changes its still the same.
click to viewAugust 23, 2020 at 2:11 pm #80420johnParticipantOkay i think, I got it right.
There was already a header code on line 53 to 72. I erased it.
Thanks for the assistance i really appreciate a lot.August 23, 2020 at 2:30 pm #80421August 23, 2020 at 3:44 pm #80422johnParticipantAlthough i have managed to fix that by adding
<?php if ( is_singular() ) {
the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ );
} else {
the_title( ‘<h2 class=”entry-title”>‘, ‘</h2>’ );
} ?>on line line 62
August 23, 2020 at 3:48 pm #80423johnParticipantNow i would like to add (Continue reading) button below the posts
Just like this click to viewhow do i acheive this pls
August 25, 2020 at 6:27 am #80448Theme Horse Support TeamKeymasterPlease go to “Theme Directory > template-parts > content-php”. On line no: 78 to 80 you will find below codes.
(Since you have already customized content.php page then line no will be different)<div class="entry-content"> <p><?php echo wp_trim_words( get_the_excerpt(), absint($newscard_settings['newscard_excerpt_length_blog']) ); ?></p> </div><!-- entry-content -->
Beneath the mentioned code just add the below mentioned Custom Code
<a href="<?php echo esc_url( get_permalink() ) ?>" class="btn btn-outline-dark" style="margin-bottom: 10px;">Continue reading</a>
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.