$content
-
I have a portfolio site I am working on, and have ran into a small roadblock for what I’m trying to accomplish.
(Warning in advance – I have no PHP experience.)
In amaz-columns.php it pulls the image and first bit of content from each post, which in my case is part of the URL of the Vimeo video at the top the page. I have a sub headline a little ways down coming from the Vantage Headline widget that I would like to be able to use here instead.
The URL for the page in question is:
https://www.zeroshame.com/video-production-portfolio/If it helps, the code for the Vantage Headline Widget:
`class Vantage_Headline_Widget extends WP_Widget {
public function __construct() {
// widget actual processes
parent::__construct(
‘headline-widget’, // Base ID
__(‘Vantage Headline’, ‘vantage’), // Name
array( ‘description’ => __( ‘A lovely big headline.’, ‘vantage’ ), ) // Args
);
}public function widget( $args, $instance ) {
echo $args[‘before_widget’];?>
<h1><?php echo esc_html($instance[‘headline’]) ?></h1>
<div class=”decoration”><div class=”decoration-inside”></div></div>
<h3><?php echo wp_kses_post($instance[‘sub_headline’]) ?></h3>
<?phpecho $args[‘after_widget’];
}public function form( $instance ) {
$instance = wp_parse_args( $instance, array(
‘headline’ => ”,
‘sub_headline’ => ”,
) );?>
<p>
<label for=”<?php echo $this->get_field_id(‘headline’) ?>”><?php _e(‘Headline’, ‘vantage’) ?></label>
<input type=”text” class=”widefat” id=”<?php echo $this->get_field_id(‘headline’) ?>” name=”<?php echo $this->get_field_name(‘headline’) ?>” value=”<?php echo esc_attr($instance[‘headline’]) ?>” />
</p>
<p>
<label for=”<?php echo $this->get_field_id(‘sub_headline’) ?>”><?php _e(‘Sub Headline’, ‘vantage’) ?></label>
<input type=”text” class=”widefat” id=”<?php echo $this->get_field_id(‘sub_headline’) ?>” name=”<?php echo $this->get_field_name(‘sub_headline’) ?>” value=”<?php echo esc_attr($instance[‘sub_headline’]) ?>” />
</p>
<?php
}
}
`Thank you!
- The topic ‘$content’ is closed to new replies.