Implement in Widget
-
Hé Man,
Great plugin!
Maybe you can help me with a problem, I’m trying to implement the code in to a plugin. but I can’t get it to work. Do you have any tips?
function generate_art_title($i) { $art_title = ''; $art_ID = ''; $art_url = ''; if($this->wdgt_config['data_source_type'] == 'custom') { $art_title = $this->wdgt_results[0][$i]->post_title; $art_ID = $this->wdgt_results[0][$i]->ID; } else { $art_title = $this->wdgt_results[$i]->post_title; $art_ID = $this->wdgt_results[$i]->ID; } $art_url = get_permalink($art_ID); $art_title_short = $this->cut_text('article_title', $art_title); $output = '<h3 class="gk-nsp-header"><a href="'.$art_url.'" title="'.str_replace('"','', $art_title).'">'.$art_title_short.'</a></h3>'; return apply_filters('gk_nsp_art_title', $output); }
I want the H3 to be replaced with the secondary title, I tried all sorts of things..
So something like;
<h3 class="gk-nsp-header"><a href="'.$art_url.'" title="'.str_replace('"','', $secondary_title).'">'.$secondary_title.'</a></h3>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Implement in Widget’ is closed to new replies.