function rb_portfolio_display_thickbox_content() { global $wp_query; $permalink = get_post_meta(get_the_ID(), '_rbp_file_upload', true); echo '<div style="display:none;" id="portfolio-content-' . ($wp_query->current_post + 1) . '">'; echo '<h1>' . get_the_title() . '</h1>'; include_once ABSPATH . 'wp-admin/includes/plugin.php'; if (is_plugin_active('secondary-title/secondary-title.php')) { $secondary_title = get_secondary_title(); if (!empty($secondary_title)) { echo '<h2>' . $secondary_title . '</h2>'; } } the_content(); $permalink = get_post_meta(get_the_ID(), '_rbp_file_upload', true); ?> <p> <a target="_blank" href="<?php echo $permalink; ?> " class="button">View the full article...</a> </p> <?php echo '</div>'; }
function rb_portfolio_custom_post_title($title) { $post_title = get_the_title(get_the_ID()); $primary_title = '<h3 class="entry-title" itemprop="headline">' . $post_title . '</h3>'; include_once ABSPATH . 'wp-admin/includes/plugin.php'; if (is_plugin_active('secondary-title/secondary-title.php')) { $secondary_title = get_secondary_title(); if (!empty($secondary_title)) { $secondary_title = '<h3 class="entry-subtitle">' . $secondary_title . '</h3>'; } $title = $primary_title . $secondary_title; } else { $title = $primary_title; } return $title; }
function x_banner_button($atts, $content) { ob_start(); if (has_post_thumbnail($post->ID)) { $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail'); $thumb_img = get_post(get_post_thumbnail_id($post->ID)); $imagePath = $image[0]; } $output = '<div class="bannerText">'; $output .= '<div id="page-header" style="background-image: url(' . wpthumb($imagePath, 'width=1500&height=450&crop=1&resize=1') . ')">'; $output .= '<div class="container">'; $output .= '<div class="container pageheader">'; $output .= '<h2>' . get_the_title() . '</h2>'; $output .= '<div class="text-separator"></div>'; $output .= '<h4>'; if (is_plugin_active('secondary-title/secondary-title.php')) { //plugin is activated $output .= get_secondary_title(); } $output .= '</h4>'; $output .= '</div>'; $settings = get_option("lowestroomavailable"); $var1 = unserialize($settings); //print_r($var1); //$amt = $var1->amount; if ($var1->amount != 0) { $output .= '<a class="btn-danger bannerbtn pull-right">Need a room tonight? Book for ' . edd_currency_filter(edd_format_amount($var1->amount)) . '</a>'; } $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; return $output; $returnvariable = ob_get_clean(); return $returnvariable; }
/** * Echo post title * @since 2.0.0.1 * @version 1.1 * @param string $tag - h tag, ex: h1,h2,h3 etc * @param bool $link - true|false; Use link to post * @param null $post_id - Post ID */ public function title($tag = 'h2', $link = false, $post_id = null) { if (function_exists('has_secondary_title') && has_secondary_title($post_id)) { $title = get_secondary_title($post_id); } else { $title = get_the_title($post_id); } if ($title) { ?> <div class="<?php echo get_post_type(); ?> -title entry-title"> <?php if ($link == true) { ?> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <?php echo '<' . $tag . '>' . $title . '</' . $tag . '>'; ?> </a> <?php } else { echo '<' . $tag . '>' . $title . '</' . $tag . '>'; } ?> </div> <?php } }
the_title(); ?> </a></p> </div> <div class="content__specially-item--no-img__partner"> <a href="<?php the_permalink(); ?> "> <?php echo get_the_post_thumbnail($postID, 'post-list-large-thumbnail', array('class' => 'img-responsive img-circle content__specially-item--no-img-icon')); ?> </a> <h4> <a href="<?php the_permalink(); ?> "><?php echo get_secondary_title(); ?> </a> <? if($displayPartnerTitle == 'on'): ?> <br> <span>Партнерская статья</span> <? endif; ?> </h4> </div> </div> </div>
function bootplate_subtitle() { global $post; //$id = get_the_ID(); if (have_bootplate_subtitle('name') == 'wp-subtitle') { echo get_the_subtitle($post->ID, '<p>', '</p>', false); } elseif (have_bootplate_subtitle('name') == 'kia-subtitle') { echo '<p>' . get_the_subtitle($post->ID) . '</p>'; } elseif (have_bootplate_subtitle('name') == 'secondary-title') { echo get_secondary_title($post->ID, '<p>', '</p>'); } }