Latest News Problem


#1

Hi,

I added the Latest News widget to my front page (www.terratrotter.eu), however I run into several issues that I can’t get resolved:

Long titles doesn’t shown up in their entirety (Font-size does not adapt). As a result also the “read more” link is not shown.

How can I fix this?

Is it possible to link the entire thumbnail/image to the specific post, so my readers can press anywhere on the image instead of only “read more” when they want to read the post?

Thank you,
Nicole


#2

I am trying to add a new row and the widget in the free version of sydney and make it my ‘latest news’ section to serve as my blog - I created a ‘blog’ page. I added the widget. But when I add the widget and put in a title it is not attaching to the ‘home page’… http://www.heavenandearthaquaponics.com/


#3

@nvh you can try to use this css code below:

#recent-posts figure.post h3 {
    font-size: 18px;
    max-height: 190px;
}

If you want to make the link possible to the photo, you have to create a child theme first.

Hi @thejakestershow please creat you own thread that related to your theme


#4

Awan,
Thank you for your suggestion. Where do I place the code. You said “make the link possible to the photo”. I do not understand this phrase.
Also, I have never created a child theme. What is it?
Also, I’m not sure where to create my own thread. I looked for a tab to start a thread but could not find it.
Thanks for all your assistance,
Jake


#5

I am trying to connect ‘latest news’ with the above row and here’s the demo site I’ve been trying to duplicate with instructions from the one who put it together. but when I look at the code on this :http://www.howtowebby.com/ in the latest news it doesn’t match mine so I’m not sure if the instructor who is remote and no available did not include a step OR if the widget has changed.


#6

@Awan
You first suggestion helped. Thanks

If you want to make the link possible to the photo, you have to create a child theme first."

I have a child theme already installed, can you suggest how to code this.

Thank you,
Nicole


#7

@thejackestershow You are using sydney theme and you post your question in sweatheat theme, please post your question here https://athemes.com/forums/forum/sydney/

It’s just to make all thread structured, and hope all thread can be useful for others in the future :slight_smile:

@nvh Great! duplicate widgets/fp-latest-news.php to your child theme and Now follow the step below:

  1. find the_permalink() on widgets/fp-latest-news.php, you will got this line:
    <p>"><?php echo __(‘Read more’, ‘sweetheat’); ?></p> http://prntscr.com/90bak6

  2. Move this <a href="<?php esc_url( the_permalink() ); ?>"> after <figure class="post">

  3. Move this </a> before </figure>

  4. remove this <p><?php echo __('Read more', 'sweetheat'); ?></p>

When you finish, you should have the code like this http://prntscr.com/90baeu


#8

@Awan

I still doesn’t work. Even the “read more” is still there which I don’t understand since it is not longer in fp-latest-news.php


#9

Can you take a screenshot of your modified code?


#10

What I could find on google is that I also have to add something to the function.php in my child theme so it would register the widget.php in my child theme folder, just duplicating it would not suffice.
However it is still unclear what I have to add in the function.php

I already tried adding
/**
*if ( function_exists(‘siteorigin_panels_activate’) ) {

  • require get_stylesheet_directory() . “/widgets/fp-latest-news.php”; }
    */

However, that alone made my site go blank.

Not sure if I have to add
/**

  • if ( function_exists(‘siteorigin_panels_activate’) ) {
  •   register_widget( 'Sweetheat_Latest_News' );}
    

*/
first?


#11

Ah right! I forget to tell you about functions.php

After you done with the steps above:

  1. put this code in your functions.php (child theme):
if ( function_exists('siteorigin_panels_activate') ) {
  require_once get_template_directory() . "-child/widgets/fp-latest-news.php";
}
  1. Now activate your child theme (your site will go blank after this)
  2. Edit functions.php in your parent theme and change this line:
    require get_template_directory() . "/widgets/fp-latest-news.php";

to // require get_template_directory() . "/widgets/fp-latest-news.php";

  1. reload your browser

#12

@Awan

Is there a way that you don’t have to make changes to the parent theme. I’m worried that with with each update I have to make these changes again.

Thanks
Nicole


#13

So far as I know there is no other way to do not make a change to the parent for this case, you have to do it manually.

Cheers,
Awan