WordPress.org

Ready to get started?Download WordPress

Forums

KIA Subtitle
[resolved] Not Working (11 posts)

  1. wi.pimentel
    Member
    Posted 10 months ago #

    Hello,

    i just install your plugin and put the correct code( <?php if( function_exists( 'the_subtitle' ) ) the_subtitle( '<h2 class="subtitle">', '</h2>' ); ?>) on php files and css files for style...

    I really don´t know why this not working!

    Can anyone help me?

    website:http://gazetadabeira.pt/

    http://wordpress.org/plugins/kia-subtitle/

  2. helgatheviking
    Member
    Plugin Author

    Posted 10 months ago #

    Are you within the Loop?

  3. wi.pimentel
    Member
    Posted 10 months ago #

    yeah, i think so...

    example:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    					<div id="post-<?php the_ID(); ?>" <?php post_class('entry');?>>
    
    						<h1 class="entry_title">
    							<a>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'wpnewspaper' ), the_title_attribute( 'echo=0' ) ); ?>" ><?php the_title(); ?><strong><?php if( function_exists( 'the_subtitle' ) ) the_subtitle( '<h2 class="subtitle">', '</h2>' ); ?></strong></a>
    						</h1>
    
    						<?php
    						// Display edit post link to site admin
    						edit_post_link(__('Edit This Post','wpnewspaper'),'<p>','</p>');

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum's parser.]

  4. helgatheviking
    Member
    Plugin Author

    Posted 10 months ago #

    Why are you putting the code inside the h1 tag? Try placing it right after and see if that helps.

  5. wi.pimentel
    Member
    Posted 10 months ago #

    yeah :) works...

    but if you look, it appears this after the image:
    "Câmara de Oliveira de Frades teve de aderir ao PAEL para pagar a fornecedores e diminuiu número de funcionários " title="Com um orçamento de 14 milhões de euros
    Câmara de Oliveira de Frades teve de aderir ao PAEL para pagar a fornecedores e diminuiu número de funcionários
    " />"

    this is because the format that html is written! what i have to do for this disappear?

    I think it's because the implementation of filters

  6. helgatheviking
    Member
    Plugin Author

    Posted 10 months ago #

    I'm sorry I don't fully understand, there isn't even any image in the code you posted as far as I can tell, because it looks like the forum ruined some of your posted code.

    The plugin works. How you write your theme's HTML is up to you. I can confirm that the following code works:

    <a href="<?php echo get_permalink();?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'wpnewspaper' ), the_title_attribute( 'echo=0' ) ); ?>" ><?php the_title(); ?><?php if( function_exists( 'the_subtitle' ) ) the_subtitle( '<h2 class="subtitle">', '</h2>' ); ?></a>
  7. wi.pimentel
    Member
    Posted 10 months ago #

    sorry...

    can you go to http://gazetadabeira.pt/?

    you can see a title "Com um orçamento de 14 milhões de euros
    Câmara de Oliveira de Frades teve de aderir ao PAEL para pagar a fornecedores e diminuiu número de funcionários"...
    So, at the bottom of the title I have a picture and at the bottom of the picture I have a text saying ""Câmara de Oliveira de Frades teve de aderir ao PAEL para pagar a fornecedores e diminuiu número de funcionários " title="Com um orçamento de 14 milhões de euros
    Câmara de Oliveira de Frades teve de aderir ao PAEL para pagar a fornecedores e diminuiu número de funcionários
    " />""

    This text appears because of pluggin! How can i take off this text?

  8. helgatheviking
    Member
    Plugin Author

    Posted 10 months ago #

    The text does not appear because of the plugin. Please pay special attention to opening and closing quotation marks and other coding punctuation. It is your responsibility to verify that your HTML syntax is correct.

  9. wi.pimentel
    Member
    Posted 10 months ago #

    ok! thank u :)

  10. helgatheviking
    Member
    Plugin Author

    Posted 10 months ago #

    You're welcome.

  11. disconnected
    Member
    Posted 10 months ago #

    The problem with wi.pimentel is that the post's image uses post title in the 'alt' and 'title' property of the 'img' tag. With the plugin he is using, the post's title is returned more or less like this :

    <span class="...">title</title>

    As you can see, there are quotes in the title, making the img tag become unformatted, and messing with the html.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.