Coder Social home page Coder Social logo

Comments (39)

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

Hi @travelinboots. The only way that Subtitles will not be shown by default is if your theme is using non-standard Loops. Please see the FAQ and look into using the_subtitle or get_the_subtitle for your needs. Hope that helps and let me know how it goes.

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

Look under the Using Template Tags section and put one of those template tags into your single.php file. That should be enough.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Hello Philip, I copied and pasted the code in my single.php file but it didn't work.

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

@travelinboots If those are pages then you might need to do the same thing in page.php. The advice I gave you was just for posts. Try the page.php file as well.

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

Can you post the code from your single.php file here?

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Sure hold on.

<?php
/**
 * The template used for displaying page content in page.php
 *
 * @package ThemeGrill
 * @subpackage Spacious
 * @since Spacious 1.0
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php do_action( 'spacious_before_post_content' ); ?>
    <div class="entry-content clearfix">
        <?php 
            the_content();

            wp_link_pages( array( 
            'before'            => '<div style="clear: both;"></div><div class="pagination clearfix">'.__( 'Next Page:', 'spacious' ),
            'after'             => '</div>',
            'link_before'       => '<span>',
            'link_after'        => '</span>'
      ) );

            $spacious_tag_list = get_the_tag_list( '', '&nbsp;&nbsp;&nbsp;&nbsp;', '' );
            if( !empty( $spacious_tag_list ) ) {
                ?>
                <div class="tags">
                    <?php
                    _e( 'Tagged on: ', 'spacious' ); echo $spacious_tag_list;
                    ?>
                </div>
                <?php
            }

        ?>
    </div>

    <footer class="entry-meta-bar clearfix">                        
        <div class="entry-meta clearfix">
            <span class="by-author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a></span>
            <span class="date"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( get_the_time() ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></span>
            <?php if( has_category() ) { ?>
            <span class="category"><?php the_category(', '); ?></span>
        <?php } ?>
                <?php if ( comments_open() ) { ?>
            <span class="comments"><?php comments_popup_link( __( 'No Comments', 'spacious' ), __( '1 Comment', 'spacious' ), __( '% Comments', 'spacious' ), '', __( 'Comments Off', 'spacious' ) ); ?></span>
        <?php } ?>
        <?php edit_post_link( __( 'Edit', 'spacious' ), '<span class="edit-link">', '</span>' ); ?>
        </div>
    </footer>
    <?php
    do_action( 'spacious_after_post_content' );
   ?>
</article>

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

Where's this?

<div class="header-post-title-container clearfix">
            <div class="inner-wrap">
                <div class="post-title-wrapper">
                                        <h1 class="header-post-title-class">An Eerie Wander Through The Forest of Kanmangafuchi Abyss</h1>
                                </div>
                            </div>
        </div>

Is that in your header.php file?

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

I pasted the wrong code. I apologize. This is the correct one:

<?php 
/**
 * Theme Single Post Section for our theme.
 *
 * @package ThemeGrill
 * @subpackage Spacious
 * @since Spacious 1.0
 */
?>

<?php get_header(); ?>


    <?php do_action( 'spacious_before_body_content' ); ?>

    <div id="primary">
        <div id="content" class="clearfix">
            <?php while ( have_posts() ) : the_post(); ?>

                <?php get_template_part( 'content', 'single' ); ?>

                <?php get_template_part( 'navigation', 'archive' ); ?>

                <?php
                    do_action( 'spacious_before_comments_template' );
                    // If comments are open or we have at least one comment, load up the comment template
                    if ( comments_open() || '0' != get_comments_number() )
                        comments_template();                    
                do_action ( 'spacious_after_comments_template' );
                ?>

            <?php endwhile; ?>

        </div><!-- #content -->
    </div><!-- #primary -->

    <?php spacious_sidebar_select(); ?>

    <?php do_action( 'spacious_after_body_content' ); ?>

<?php get_footer(); ?>

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

I still don't see the_title there. I'm thinking it's probably in your header.php file.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Hmm odd. Here's my header.php

<?php 
/**
 * Theme Header Section for our theme.
 * 
 * Displays all of the <head> section and everything up till <div id="main" class="clearfix"> <div class="inner-wrap">
 *
 * @package ThemeGrill
 * @subpackage Spacious
 * @since Spacious 1.0
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
    <?php
    /**
     * Print the <title> tag based on what is being viewed.
     */
    wp_title( '|', true, 'right' );
    ?>
</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
/** 
 * This hook is important for wordpress plugins and other many things
 */
wp_head();
?>
</head>

<body <?php body_class(); ?>>
<?php   do_action( 'before' ); ?>
<div id="page" class="hfeed site">
    <?php do_action( 'spacious_before_header' ); ?>
    <header id="masthead" class="site-header clearfix">

        <?php if( of_get_option( 'spacious_activate_top_header_bar', 0 ) == 1 ) { ?>
            <div id="header-meta" class="clearfix">
                <div class="inner-wrap">
                    <?php
                        if( of_get_option( 'spacious_activate_social_links', 0 ) == 1 ) { spacious_social_links(); }                
                        spacious_header_info_text();
                    ?>
                    <nav class="small-menu" class="clearfix">
                        <?php 
                            if ( has_nav_menu( 'header' ) ) { 
                                wp_nav_menu( array( 'theme_location' => 'header', 'depth' => -1 ) ); 
                            } 
                        ?>
                    </nav>
                </div>
            </div>
        <?php } ?>

        <?php if( of_get_option( 'spacious_header_image_position', 'above' ) == 'above' ) { spacious_render_header_image(); } ?>

        <div id="header-text-nav-container">
            <div class="inner-wrap">

                <div id="header-text-nav-wrap" class="clearfix">
                    <div id="header-left-section">
                        <?php 
                        if( ( of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'logo_only' ) && of_get_option( 'spacious_header_logo_image', '' ) != '' ) {
                        ?>
                            <div id="header-logo-image">
                                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php echo of_get_option( 'spacious_header_logo_image', '' ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a>
                            </div><!-- #header-logo-image -->
                        <?php
                        }

                        if( of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'text_only' ) {
                        ?>
                        <div id="header-text">
                            <h1 id="site-title"> 
                                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
                            </h1>
                            <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2><!-- #site-description -->
                        </div><!-- #header-text -->
                        <?php
                        }
                        ?>
                    </div><!-- #header-left-section -->
                    <div id="header-right-section">
                        <?php
                        if( is_active_sidebar( 'spacious_header_sidebar' ) ) {
                        ?>                              
                        <div id="header-right-sidebar" class="clearfix">
                        <?php
                            // Calling the header sidebar if it exists.
                            if ( !dynamic_sidebar( 'spacious_header_sidebar' ) ):
                            endif;
                        ?>      
                        </div>
                        <?php
                        }
                        ?>
                        <nav id="site-navigation" class="main-navigation" role="navigation">
                            <h1 class="menu-toggle"><?php _e( 'Menu', 'spacious' ); ?></h1>
                            <?php
                                if ( has_nav_menu( 'primary' ) ) {                                  
                                    wp_nav_menu( array( 'theme_location' => 'primary' ) );
                                }
                                else {
                                    wp_page_menu();
                                }
                            ?>
                        </nav>                  
                    </div><!-- #header-right-section --> 

               </div><!-- #header-text-nav-wrap -->
            </div><!-- .inner-wrap -->
        </div><!-- #header-text-nav-container -->

        <?php if( of_get_option( 'spacious_header_image_position', 'above' ) == 'below' ) { spacious_render_header_image(); } ?>

        <?php
    if( of_get_option( 'spacious_activate_slider', '0' ) == '1' ) {
            if ( ( of_get_option( 'spacious_slider_status', 'home_front_page' ) == 'all_page' ) || ( ( is_home() || is_front_page() ) &&  of_get_option( 'spacious_slider_status', 'home_front_page' ) == 'home_front_page' ) ) { 
                spacious_pass_slider_parameters();
            spacious_featured_image_slider();
            }
    }

        if( ( '' != spacious_header_title() )  && !( is_home() || is_front_page() ) ) {
        ?>
        <div class="header-post-title-container clearfix">
            <div class="inner-wrap">
                <div class="post-title-wrapper">
                    <?php 
                    if( '' != spacious_header_title() ) {
                    ?>
                    <h1 class="header-post-title-class"><?php echo spacious_header_title(); ?></h1>
                   <?php
                    }
                    ?>
                </div>
                <?php if( function_exists( 'spacious_breadcrumb' ) ) { spacious_breadcrumb(); } ?>
            </div>
        </div>
        <?php
       }
       ?>
    </header>
    <?php do_action( 'spacious_after_header' ); ?>
    <?php do_action( 'spacious_before_main' ); ?>
    <div id="main" class="clearfix">
        <div class="inner-wrap">

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

Looks like the theme is using a custom title function, which is why the plugin doesn't work out of the box:

<?php echo spacious_header_title(); ?>

Look for this line:

<h1 class="header-post-title-class"><?php echo spacious_header_title(); ?></h1>

Change it to the following:

<h1 class="header-post-title-class">
<?php echo spacious_header_title(); ?>
<span class="entry-subtitle">
<?php if ( function_exists( 'the_subtitle' ) ) { echo get_the_subtitle(); } ?>
</span>
</h1>

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Holy cow it's working now!! Thank you!! Very genius!

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

This would actually be a little better:

<h1 class="header-post-title-class">
    <?php echo spacious_header_title(); ?>
        <?php if ( function_exists( 'the_subtitle' ) ) { ?>
            <span class="entry-subtitle">
        <?php echo get_the_subtitle(); ?>
            </span>
        <?php } ?>
</h1>

Glad that it worked. Leave me a plugin review on WordPress.org if you have some time. 😄

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Hello Philip,
I just found out that there's an extra code showing under the Subtitles when viewed on a different page:
http://www.travelinboots.com/blog/

I wonder why there's an extra "> there and how to remove it. I check the codes and couldn't find anything.

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

Can you post your code again? I can look at this in an hour or two when I
get up. :)
On Aug 16, 2014 7:31 AM, "travelinboots" [email protected] wrote:

Hello Philip,
I just found out that there's an extra code showing under the Subtitles
when viewed on a different page:
http://www.travelinboots.com/blog/

I wonder why there's an extra "> there and how to remove it. I check the
codes and couldn't find anything.


Reply to this email directly or view it on GitHub
#25 (comment)
.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Ooops sorry to wake you up! But here's the code

<?php 
/**
 * Theme Header Section for our theme.
 * 
 * Displays all of the <head> section and everything up till <div id="main" class="clearfix"> <div class="inner-wrap">
 *
 * @package ThemeGrill
 * @subpackage Spacious
 * @since Spacious 1.0
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
    <?php
    /**
     * Print the <title> tag based on what is being viewed.
     */
    wp_title( '|', true, 'right' );
    ?>
</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
/** 
 * This hook is important for wordpress plugins and other many things
 */
wp_head();
?>
</head>

<body <?php body_class(); ?>>
<?php   do_action( 'before' ); ?>
<div id="page" class="hfeed site">
    <?php do_action( 'spacious_before_header' ); ?>
    <header id="masthead" class="site-header clearfix">

        <?php if( of_get_option( 'spacious_activate_top_header_bar', 0 ) == 1 ) { ?>
            <div id="header-meta" class="clearfix">
                <div class="inner-wrap">
                    <?php
                        if( of_get_option( 'spacious_activate_social_links', 0 ) == 1 ) { spacious_social_links(); }                
                        spacious_header_info_text();
                    ?>
                    <nav class="small-menu" class="clearfix">
                        <?php 
                            if ( has_nav_menu( 'header' ) ) { 
                                wp_nav_menu( array( 'theme_location' => 'header', 'depth' => -1 ) ); 
                            } 
                        ?>
                    </nav>
                </div>
            </div>
        <?php } ?>

        <?php if( of_get_option( 'spacious_header_image_position', 'above' ) == 'above' ) { spacious_render_header_image(); } ?>

        <div id="header-text-nav-container">
            <div class="inner-wrap">

                <div id="header-text-nav-wrap" class="clearfix">
                    <div id="header-left-section">
                        <?php 
                        if( ( of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'logo_only' ) && of_get_option( 'spacious_header_logo_image', '' ) != '' ) {
                        ?>
                            <div id="header-logo-image">
                                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php echo of_get_option( 'spacious_header_logo_image', '' ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a>
                            </div><!-- #header-logo-image -->
                        <?php
                        }

                        if( of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'text_only' ) {
                        ?>
                        <div id="header-text">
                            <h1 id="site-title"> 
                                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
                            </h1>
                            <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2><!-- #site-description -->
                        </div><!-- #header-text -->
                        <?php
                        }
                        ?>
                    </div><!-- #header-left-section -->
                    <div id="header-right-section">
                        <?php
                        if( is_active_sidebar( 'spacious_header_sidebar' ) ) {
                        ?>                              
                        <div id="header-right-sidebar" class="clearfix">
                        <?php
                            // Calling the header sidebar if it exists.
                            if ( !dynamic_sidebar( 'spacious_header_sidebar' ) ):
                            endif;
                        ?>      
                        </div>
                        <?php
                        }
                        ?>
                        <nav id="site-navigation" class="main-navigation" role="navigation">
                            <h1 class="menu-toggle"><?php _e( 'Menu', 'spacious' ); ?></h1>
                            <?php
                                if ( has_nav_menu( 'primary' ) ) {                                  
                                    wp_nav_menu( array( 'theme_location' => 'primary' ) );
                                }
                                else {
                                    wp_page_menu();
                                }
                            ?>
                        </nav>                  
                    </div><!-- #header-right-section --> 

               </div><!-- #header-text-nav-wrap -->
            </div><!-- .inner-wrap -->
        </div><!-- #header-text-nav-container -->

        <?php if( of_get_option( 'spacious_header_image_position', 'above' ) == 'below' ) { spacious_render_header_image(); } ?>

        <?php
    if( of_get_option( 'spacious_activate_slider', '0' ) == '1' ) {
            if ( ( of_get_option( 'spacious_slider_status', 'home_front_page' ) == 'all_page' ) || ( ( is_home() || is_front_page() ) &&  of_get_option( 'spacious_slider_status', 'home_front_page' ) == 'home_front_page' ) ) { 
                spacious_pass_slider_parameters();
            spacious_featured_image_slider();
            }
    }

        if( ( '' != spacious_header_title() )  && !( is_home() || is_front_page() ) ) {
        ?>
        <div class="header-post-title-container clearfix">
            <div class="inner-wrap">
                <div class="post-title-wrapper">
                    <?php 
                    if( '' != spacious_header_title() ) {
                    ?>
                    <h1 class="header-post-title-class">
    <?php echo spacious_header_title(); ?>
        <?php if ( function_exists( 'the_subtitle' ) ) { ?>
            <span class="entry-subtitle">
        <?php echo get_the_subtitle(); ?>
            </span>
        <?php } ?>
</h1>
                   <?php
                    }
                    ?>
                </div>
                <?php if( function_exists( 'spacious_breadcrumb' ) ) { spacious_breadcrumb(); } ?>
            </div>
        </div>
        <?php
       }
       ?>
    </header>
    <?php do_action( 'spacious_after_header' ); ?>
    <?php do_action( 'spacious_before_main' ); ?>
    <div id="main" class="clearfix">
        <div class="inner-wrap">

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

That's the wrong file.
On Aug 16, 2014 8:31 AM, "travelinboots" [email protected] wrote:

Ooops sorry to wake you up! But here's the code

'', 'default-text-color' => '222222', 'width' => 1400, 'height' => 400, 'flex-width' => true, 'flex-height' => true, 'wp-head-callback' => 'spacious_header_style', 'admin-head-callback' => 'spacious_admin_header_style', 'admin-preview-callback' => 'spacious_admin_header_image', ) ) ); } add_action( 'after_setup_theme', 'spacious_custom_header_setup' ); if ( ! function_exists( 'spacious_header_style' ) ) : /** - Styles the header text displayed on the blog. * */ function spacious_header_style() { $header_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value if ( HEADER_TEXTCOLOR == $header_text_color ) { return; } // If we get this far, we have custom styles. Let's do this. ?> #site-title, #site-description { position: absolute; clip: rect(1px,

1px, 1px, 1px); } #site-title a { color: #; } #site-description { color: #; }

Header admin panel. * - @see https://github.com/see spacious_custom_header_setup(). */ function spacious_admin_header_style() { ?> .appearance_page_custom-header

#headimg { border: none; } #headimg h1, #desc { } #headimg h1 { } #headimg
h1 a { text-decoration: none; } #desc { } #headimg img { } <?php } endif;
// spacious_admin_header_style

if ( ! function_exists( 'spacious_admin_header_image' ) ) :
/**

  • Custom header image markup displayed on the Appearance > Header
    admin panel. *
  • @see https://github.com/see spacious_custom_header_setup(). */
    function spacious_admin_header_image() { $style = sprintf( '
    style="color:#%s;"', get_header_textcolor() ); ?>
    onclick="return false;" href="">


Reply to this email directly or view it on GitHub
#25 (comment)
.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Sorry. UGH.

<?php 
/**
 * Theme Header Section for our theme.
 * 
 * Displays all of the <head> section and everything up till <div id="main" class="clearfix"> <div class="inner-wrap">
 *
 * @package ThemeGrill
 * @subpackage Spacious
 * @since Spacious 1.0
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
    <?php
    /**
     * Print the <title> tag based on what is being viewed.
     */
    wp_title( '|', true, 'right' );
    ?>
</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
/** 
 * This hook is important for wordpress plugins and other many things
 */
wp_head();
?>
</head>

<body <?php body_class(); ?>>
<?php   do_action( 'before' ); ?>
<div id="page" class="hfeed site">
    <?php do_action( 'spacious_before_header' ); ?>
    <header id="masthead" class="site-header clearfix">

        <?php if( of_get_option( 'spacious_activate_top_header_bar', 0 ) == 1 ) { ?>
            <div id="header-meta" class="clearfix">
                <div class="inner-wrap">
                    <?php
                        if( of_get_option( 'spacious_activate_social_links', 0 ) == 1 ) { spacious_social_links(); }                
                        spacious_header_info_text();
                    ?>
                    <nav class="small-menu" class="clearfix">
                        <?php 
                            if ( has_nav_menu( 'header' ) ) { 
                                wp_nav_menu( array( 'theme_location' => 'header', 'depth' => -1 ) ); 
                            } 
                        ?>
                    </nav>
                </div>
            </div>
        <?php } ?>

        <?php if( of_get_option( 'spacious_header_image_position', 'above' ) == 'above' ) { spacious_render_header_image(); } ?>

        <div id="header-text-nav-container">
            <div class="inner-wrap">

                <div id="header-text-nav-wrap" class="clearfix">
                    <div id="header-left-section">
                        <?php 
                        if( ( of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'logo_only' ) && of_get_option( 'spacious_header_logo_image', '' ) != '' ) {
                        ?>
                            <div id="header-logo-image">
                                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php echo of_get_option( 'spacious_header_logo_image', '' ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a>
                            </div><!-- #header-logo-image -->
                        <?php
                        }

                        if( of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'text_only' ) {
                        ?>
                        <div id="header-text">
                            <h1 id="site-title"> 
                                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
                            </h1>
                            <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2><!-- #site-description -->
                        </div><!-- #header-text -->
                        <?php
                        }
                        ?>
                    </div><!-- #header-left-section -->
                    <div id="header-right-section">
                        <?php
                        if( is_active_sidebar( 'spacious_header_sidebar' ) ) {
                        ?>                              
                        <div id="header-right-sidebar" class="clearfix">
                        <?php
                            // Calling the header sidebar if it exists.
                            if ( !dynamic_sidebar( 'spacious_header_sidebar' ) ):
                            endif;
                        ?>      
                        </div>
                        <?php
                        }
                        ?>
                        <nav id="site-navigation" class="main-navigation" role="navigation">
                            <h1 class="menu-toggle"><?php _e( 'Menu', 'spacious' ); ?></h1>
                            <?php
                                if ( has_nav_menu( 'primary' ) ) {                                  
                                    wp_nav_menu( array( 'theme_location' => 'primary' ) );
                                }
                                else {
                                    wp_page_menu();
                                }
                            ?>
                        </nav>                  
                    </div><!-- #header-right-section --> 

               </div><!-- #header-text-nav-wrap -->
            </div><!-- .inner-wrap -->
        </div><!-- #header-text-nav-container -->

        <?php if( of_get_option( 'spacious_header_image_position', 'above' ) == 'below' ) { spacious_render_header_image(); } ?>

        <?php
    if( of_get_option( 'spacious_activate_slider', '0' ) == '1' ) {
            if ( ( of_get_option( 'spacious_slider_status', 'home_front_page' ) == 'all_page' ) || ( ( is_home() || is_front_page() ) &&  of_get_option( 'spacious_slider_status', 'home_front_page' ) == 'home_front_page' ) ) { 
                spacious_pass_slider_parameters();
            spacious_featured_image_slider();
            }
    }

        if( ( '' != spacious_header_title() )  && !( is_home() || is_front_page() ) ) {
        ?>
        <div class="header-post-title-container clearfix">
            <div class="inner-wrap">
                <div class="post-title-wrapper">
                    <?php 
                    if( '' != spacious_header_title() ) {
                    ?>
                    <h1 class="header-post-title-class">
    <?php echo spacious_header_title(); ?>
        <?php if ( function_exists( 'the_subtitle' ) ) { ?>
            <span class="entry-subtitle">
        <?php echo get_the_subtitle(); ?>
            </span>
        <?php } ?>
</h1>
                   <?php
                    }
                    ?>
                </div>
                <?php if( function_exists( 'spacious_breadcrumb' ) ) { spacious_breadcrumb(); } ?>
            </div>
        </div>
        <?php
       }
       ?>
    </header>
    <?php do_action( 'spacious_after_header' ); ?>
    <?php do_action( 'spacious_before_main' ); ?>
    <div id="main" class="clearfix">
        <div class="inner-wrap">

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

Great. Give me an hour or so. Need my morning coffee first.
On Aug 16, 2014 8:37 AM, "travelinboots" [email protected] wrote:

Sorry. UGH.

  • Print the tag based on what is being viewed. */ wp_title( '|',
    true, 'right' ); ?> *
    'header', 'depth' => -1 ) ); } ?>

        </div>
    <?php } ?>
    
    <?php if( of_get_option( 'spacious_header_image_position', 'above' ) == 'above' ) { spacious_render_header_image(); } ?>
    
    <div id="header-text-nav-container">
        <div class="inner-wrap">
    
            <div id="header-text-nav-wrap" class="clearfix">
                <div id="header-left-section">
                    <?php
                    if( ( of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'logo_only' ) && of_get_option( 'spacious_header_logo_image', '' ) != '' ) {
                    ?>
                        <div id="header-logo-image">
                            <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php echo of_get_option( 'spacious_header_logo_image', '' ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a>
                        </div><!-- #header-logo-image -->
                    <?php
                    }
    
                    if( of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'spacious_show_header_logo_text', 'text_only' ) == 'text_only' ) {
                    ?>
                    <div id="header-text">
                        <h1 id="site-title">
                            <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
                        </h1>
                        <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2><!-- #site-description -->
                    </div><!-- #header-text -->
                    <?php
                    }
                    ?>
                </div><!-- #header-left-section -->
                <div id="header-right-section">
                    <?php
                    if( is_active_sidebar( 'spacious_header_sidebar' ) ) {
                    ?>
                    <div id="header-right-sidebar" class="clearfix">
                    <?php
                        // Calling the header sidebar if it exists.
                        if ( !dynamic_sidebar( 'spacious_header_sidebar' ) ):
                        endif;
                    ?>
                    </div>
                    <?php
                    }
                    ?>
                    <nav id="site-navigation" class="main-navigation" role="navigation">
                        <h1 class="menu-toggle"><?php _e( 'Menu', 'spacious' ); ?></h1>
                        <?php
                            if ( has_nav_menu( 'primary' ) ) {
                                wp_nav_menu( array( 'theme_location' => 'primary' ) );
                            }
                            else {
                                wp_page_menu();
                            }
                        ?>
                    </nav>
                </div><!-- #header-right-section -->
    
           </div><!-- #header-text-nav-wrap -->
        </div><!-- .inner-wrap -->
    </div><!-- #header-text-nav-container -->
    
    <?php if( of_get_option( 'spacious_header_image_position', 'above' ) == 'below' ) { spacious_render_header_image(); } ?>
    
    <?php
    

    if( of_get_option( 'spacious_activate_slider', '0' ) == '1' ) {
    if ( ( of_get_option( 'spacious_slider_status', 'home_front_page' ) == 'all_page' ) || ( ( is_home() || is_front_page() ) && of_get_option( 'spacious_slider_status', 'home_front_page' ) == 'home_front_page' ) ) {
    spacious_pass_slider_parameters();
    spacious_featured_image_slider();
    }
    }

    if( ( '' != spacious_header_title() )  && !( is_home() || is_front_page() ) ) {
    ?>
    <div class="header-post-title-container clearfix">
        <div class="inner-wrap">
            <div class="post-title-wrapper">
                <?php
                if( '' != spacious_header_title() ) {
                ?>
                <h1 class="header-post-title-class">
    
    <?php if ( function_exists( 'the_subtitle' ) ) { ?>
        <span class="entry-subtitle">
    <?php echo get_the_subtitle(); ?>
        </span>
    <?php } ?>
    


Reply to this email directly or view it on GitHub
#25 (comment)
.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

please relax and have a coffee first ;-)

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

My internet has been dead all morning. Seems to be common on weekends in Hanoi. I'll look at this as soon as it's back on.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Thank you Philip. I'll stand by here. Enjoy your weekend!

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

That's a bug in your theme. My hunch is that the theme author isn't using the_title correctly for attributes, which should only be called by the_title_attribute. Can you post your index.php file? I'm not sure if that's the right file or if the code is in a content part, but you should do a search for the_title in your files and if you see that being used in title attributes, you should change it to the_title_attribute. Let me know what you find.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Hello philip, there's nothing in the index.php that shows the_title_attirbute.

I found this code instead from the content-blog-full-content.php that has it:

UGH the code isn't showing here

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

When you post code, put it inside of three backticks and close it with three backticks.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024
<?php
/**
 * The template used for displaying blog post full content.
 *
 * @package ThemeGrill
 * @subpackage Spacious
 * @since Spacious 1.0
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php do_action( 'spacious_before_post_content' ); ?>
    <header class="entry-header">
        <h1 class="entry-title">
            <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute();?>"><?php the_title(); ?></a>
        </h1><!-- .entry-title -->
    </header>

    <div class="entry-content clearfix">
        <?php
            the_content(); 
            wp_link_pages( array( 
            'before'            => '<div style="clear: both;"></div><div class="pagination clearfix">'.__( 'Pages:', 'spacious' ),
            'after'             => '</div>',
            'link_before'       => '<span>',
            'link_after'        => '</span>'
      ) );
        ?>
    </div>

    <footer class="entry-meta-bar clearfix">                        
        <div class="entry-meta clearfix">
            <span class="by-author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a></span>
            <span class="date"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( get_the_time() ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></span>
            <?php if( has_category() ) { ?>
            <span class="category"><?php the_category(', '); ?></span>
        <?php } ?>
                <?php if ( comments_open() ) { ?>
            <span class="comments"><?php comments_popup_link( __( 'No Comments', 'spacious' ), __( '1 Comment', 'spacious' ), __( '% Comments', 'spacious' ), '', __( 'Comments Off', 'spacious' ) ); ?></span>
        <?php } ?>
        <?php edit_post_link( __( 'Edit', 'spacious' ), '<span class="edit-link">', '</span>' ); ?>
        </div>
    </footer>
    <?php
    do_action( 'spacious_after_post_content' );
   ?>
</article>

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

Hm. Do you have a file with the string post-featured-image inside of it? If so, post that code here.

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

When you post your code, do three backticks, the string php, and make sure the code is under and above the backticks. That's how to make it look good in this thread.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024
<?php
/**
 * The template used for displaying blog image large post.
 *
 * @package ThemeGrill
 * @subpackage Spacious
 * @since Spacious 1.0
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php do_action( 'spacious_before_post_content' ); ?>
    <header class="entry-header">
        <h1 class="entry-title">
            <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute();?>"><?php the_title(); ?></a>
        </h1><!-- .entry-title -->
    </header>

    <?php
        if( has_post_thumbnail() ) {
            if( of_get_option( 'spacious_site_layout', 'box_1218px' ) == 'box_1218px' || of_get_option( 'spacious_site_layout', 'box_1218px' ) == 'wide_1218px' ) {
                $featured = 'featured-blog-large'; 
            }
            elseif( of_get_option( 'spacious_site_layout', 'box_1218px' ) == 'box_978px' || of_get_option( 'spacious_site_layout', 'box_1218px' ) == 'wide_978px' ) {
                $featured = 'featured';
            }
            $image = '';                    
            $title_attribute = get_the_title( $post->ID );
            $image .= '<figure class="post-featured-image">';
            $image .= '<a href="' . get_permalink() . '" title="'.the_title( '', '', false ).'">';
            $image .= get_the_post_thumbnail( $post->ID, $featured, array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ) ) ).'</a>';
            $image .= '</figure>';

            echo $image;
        }
            ?>

    <div class="entry-content clearfix">
        <?php
            the_excerpt();
        ?>
    </div>

    <footer class="entry-meta-bar clearfix">                        
        <div class="entry-meta clearfix">
            <span class="by-author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a></span>
            <span class="date"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( get_the_time() ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></span>
            <?php if( has_category() ) { ?>
            <span class="category"><?php the_category(', '); ?></span>
        <?php } ?>
                <?php if ( comments_open() ) { ?>
            <span class="comments"><?php comments_popup_link( __( 'No Comments', 'spacious' ), __( '1 Comment', 'spacious' ), __( '% Comments', 'spacious' ), '', __( 'Comments Off', 'spacious' ) ); ?></span>
        <?php } ?> 
        <?php edit_post_link( __( 'Edit', 'spacious' ), '<span class="edit-link">', '</span>' ); ?>
            <span class="read-more-link"><a class="read-more" href="<?php the_permalink(); ?>"><?php echo of_get_option( 'spacious_read_more_text', __( 'Read more', 'spacious' ) ); ?></a></span>
        </div>
    </footer>
    <?php
    do_action( 'spacious_after_post_content' );
   ?>
</article>

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

This is wrong:

$image .= '<a href="' . get_permalink() . '" title="'.the_title( '', '', false ).'">';

the_title( '', '', false ) should be the_title_attribute(). Maybe alert the theme author about that bug also.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Changed it it works! There's a lot of bug in this theme ugh. not to mention I paid for it 👎 Thank you for your help. My problem now is that it's showing two titles which I am trying to figure out how to remove the second one.

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

No worries. It's annoying; paid stuff shouldn't have a ton of bugs. 😄

Where are you seeing two titles?

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Same page. http://www.travelinboots.com/blog/
Look at the Titles. There are two. One of top with link and the other one isn't linked. It's just a text which is very annoying and I want to remove

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

I think this has to do with the changed made to $image .= '<a href="' . get_permalink() . '" title="'.the_title( '', '', false ).'">';. Please post the changes you made on that line.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

it looks like this now:

$image .= '<a href="' . get_permalink() . '" title="'.the_title_attribute().'">';

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

K. That looks fine.

This is wrong: $title_attribute = get_the_title( $post->ID );. Title attribute should never use title functions not intended for attributes. The theme author should change that to use the_title_attribute with Post ID as an accepted argument. See this for more information. I suggest reporting that to the author as a bug.

In the meantime, you can remove this:

, array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ) )

That should fix it.

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Thank you Philip! I just remove that line but the two titles are still there. But please bother, I'll just contact the Theme Author about this. Thank you very much ;-)

from subtitles.

philiparthurmoore avatar philiparthurmoore commented on July 17, 2024

😄 Okie dokie. Let me know how it goes. I want to make 100% sure that Subtitles isn't breaking anything and the only thing that it ever touches is the_title via a filter, so if double titles show up and markup is appearing where it shouldn't show up, then it's either a bug in the theme you're using or Subtitles is hooking into the_title in a place where it shouldn't happen. I've found the former to be the prevailing reason. Hope you get it sorted out; let me know!

from subtitles.

travelinboots avatar travelinboots commented on July 17, 2024

Will do! Thank you again!

from subtitles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.