Facts Widget Link?

Can we make the facts link to pages? There is not an option within the widget and it is beyond my expertise to know whether or not I can add that in. I am using a Child Theme to be able to keep the customization we are using but since adding a link is not a css function - I assume it would be a php code in the fp-facts.php page? Would I want to add this code to the fp-facts.php after each fact so I can link it to the appropriate page?

<p><label for="<?php echo $this->get_field_id(‘see_all’); ?>"><?php _e(‘Enter an URL here if you want to section to link somewhere.’, ‘perth’); ?></label>
<input class=“widefat custom_media_url” id="<?php echo $this->get_field_id( ‘see_all’ ); ?>" name="<?php echo $this->get_field_name( ‘see_all’ ); ?>" type=“text” value="<?php echo $see_all; ?>" size=“3” /></p>

I assume if that is possible, I will need to create a fp-facts.php page in my child theme and add the code there so it would over-ride the Pro Theme and keep my changes during updates?

Is this correct and is this the only code I would need to include in my child theme fp-facts.php?

<p>
<label for="<?php echo $this->get_field_id(‘title’); ?>"><?php _e(‘Title’, ‘perth’); ?></label>
<input class=“widefat” id="<?php echo $this->get_field_id(‘title’); ?>" name="<?php echo $this->get_field_name(‘title’); ?>" type=“text” value="<?php echo $title; ?>" />
</p>

&lt;h4&gt;&lt;?php _e('Fact 1', 'perth'); ?&gt;&lt;/h4&gt;
&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_one'); ?&gt;"&gt;&lt;?php _e('First fact name', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_one'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_one'); ?&gt;" type="text" value="&lt;?php echo $fact_one; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_one_max'); ?&gt;"&gt;&lt;?php _e('First fact value', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_one_max'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_one_max'); ?&gt;" type="text" value="&lt;?php echo $fact_one_max; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_one_icon'); ?&gt;"&gt;&lt;?php _e('First fact icon', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_one_icon'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_one_icon'); ?&gt;" type="text" value="&lt;?php echo $fact_one_icon; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;&lt;label for="&lt;?php echo $this-&gt;get_field_id('see_all'); ?&gt;"&gt;&lt;?php _e('Enter an URL here if you want to section to link somewhere.', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat custom_media_url" id="&lt;?php echo $this-&gt;get_field_id( 'see_all' ); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name( 'see_all' ); ?&gt;" type="text" value="&lt;?php echo $see_all; ?&gt;" size="3" /&gt;&lt;/p&gt;

&lt;h4&gt;&lt;?php _e('Fact 2', 'perth'); ?&gt;&lt;/h4&gt;
&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_two'); ?&gt;"&gt;&lt;?php _e('Second fact name', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_two'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_two'); ?&gt;" type="text" value="&lt;?php echo $fact_two; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_two_max'); ?&gt;"&gt;&lt;?php _e('Second fact value', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_two_max'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_two_max'); ?&gt;" type="text" value="&lt;?php echo $fact_two_max; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_two_icon'); ?&gt;"&gt;&lt;?php _e('Second fact icon', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_two_icon'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_two_icon'); ?&gt;" type="text" value="&lt;?php echo $fact_two_icon; ?&gt;" /&gt;
&lt;/p&gt;	

&lt;p&gt;&lt;label for="&lt;?php echo $this-&gt;get_field_id('see_all'); ?&gt;"&gt;&lt;?php _e('Enter an URL here if you want to section to link somewhere.', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat custom_media_url" id="&lt;?php echo $this-&gt;get_field_id( 'see_all' ); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name( 'see_all' ); ?&gt;" type="text" value="&lt;?php echo $see_all; ?&gt;" size="3" /&gt;&lt;/p&gt;	

&lt;h4&gt;&lt;?php _e('Fact 3', 'perth'); ?&gt;&lt;/h4&gt;
&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_three'); ?&gt;"&gt;&lt;?php _e('Third fact name', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_three'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_three'); ?&gt;" type="text" value="&lt;?php echo $fact_three; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_three_max'); ?&gt;"&gt;&lt;?php _e('Third fact value', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_three_max'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_three_max'); ?&gt;" type="text" value="&lt;?php echo $fact_three_max; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_three_icon'); ?&gt;"&gt;&lt;?php _e('Third fact icon', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_three_icon'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_three_icon'); ?&gt;" type="text" value="&lt;?php echo $fact_three_icon; ?&gt;" /&gt;
&lt;/p&gt;	

&lt;p&gt;&lt;label for="&lt;?php echo $this-&gt;get_field_id('see_all'); ?&gt;"&gt;&lt;?php _e('Enter an URL here if you want to section to link somewhere.', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat custom_media_url" id="&lt;?php echo $this-&gt;get_field_id( 'see_all' ); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name( 'see_all' ); ?&gt;" type="text" value="&lt;?php echo $see_all; ?&gt;" size="3" /&gt;&lt;/p&gt;

&lt;h4&gt;&lt;?php _e('Fact 4', 'perth'); ?&gt;&lt;/h4&gt;
&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_four'); ?&gt;"&gt;&lt;?php _e('Fourth fact name', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_four'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_four'); ?&gt;" type="text" value="&lt;?php echo $fact_four; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_four_max'); ?&gt;"&gt;&lt;?php _e('Fourth fact value', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_four_max'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_four_max'); ?&gt;" type="text" value="&lt;?php echo $fact_four_max; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;label for="&lt;?php echo $this-&gt;get_field_id('fact_four_icon'); ?&gt;"&gt;&lt;?php _e('Fourth fact icon', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('fact_four_icon'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('fact_four_icon'); ?&gt;" type="text" value="&lt;?php echo $fact_four_icon; ?&gt;" /&gt;
&lt;/p&gt;

&lt;p&gt;&lt;label for="&lt;?php echo $this-&gt;get_field_id('see_all'); ?&gt;"&gt;&lt;?php _e('Enter an URL here if you want to section to link somewhere.', 'perth'); ?&gt;&lt;/label&gt;
&lt;input class="widefat custom_media_url" id="&lt;?php echo $this-&gt;get_field_id( 'see_all' ); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name( 'see_all' ); ?&gt;" type="text" value="&lt;?php echo $see_all; ?&gt;" size="3" /&gt;&lt;/p&gt;							

&lt;?php
}

Guess I can’t create a fp-facts.php page in my child theme - does that mean that if I could add that link option in the Perth-Pro Theme, each time I updated the theme it would override my changes?

Hello there,

I’m afraid we can’t overwrite the widgets > fp-facts.php template file because it is actually a custom PHP file which isn’t part of native WordPress template hierarchy.

> does that mean that if I could add that link option in the Perth-Pro Theme

Yes, you should edit the parent theme’s fp-facts.ph file. You should take it at your own risk. The modifications you have done will be overridden.

Regards,
Kharis

Ok Thanks Kharis, not worth the risk for me I found a work around although it is not my preferred option it will have to do unless you guys decide to add that option to the facts widget. Thank you.