Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author flocsy

    (@flocsy)

    your theme has some bug, because the_title_icon has 2 parameters, the 1st is post_id and is required, the 2nd is an optional boolean whether to echo (true) or return (false) the string.

    Thread Starter master412160

    (@master412160)

    I use the mystique theme from digitalsignature.

    I just tested it on an other theme which is the default wordpress theme.

    I didn’t add an icon but it already gave that error I posted in the first post.

    Doesn’t work on that either.

    So I don’t think the issue is down my side?

    Plugin Author flocsy

    (@flocsy)

    it looks like it’s in this file: /wp-content/themes/mystique2/templates/single.php on line 41

    Thread Starter master412160

    (@master412160)

    I know that because I added the code in that file. -_-

    Plugin Author flocsy

    (@flocsy)

    so pass the post_id as 1st parameter

    Thread Starter master412160

    (@master412160)

    what do you mean?

    Plugin Author flocsy

    (@flocsy)

    the_title_icon($post_id) or the_title_icon(get_the_ID())

    Thread Starter master412160

    (@master412160)

    Could you post the full code that I have to add?

    Like:

    <?php if (function_exists(‘the_title_icon’)) the_title_icon(); ?>

    Plugin Author flocsy

    (@flocsy)

    Sorry, I can’t read your mind. If this doesn’t help, then maybe post your code…

    Thread Starter master412160

    (@master412160)

    My code is simply:

    <?php if (function_exists(‘the_title_icon’)) the_title_icon(); ?>

    As you instructed to post as code in single.php, index.php, etc…

    I only added it in single.php to test out if it works which it doesn’t.

    Plugin Author flocsy

    (@flocsy)

    <?php if (function_exists('the_title_icon')) the_title_icon(get_the_ID()); ?>

    Thread Starter master412160

    (@master412160)

    Okay. I tried it out.

    But it doesn’t work properly.

    Demo link: https://www.projectideas.net/news/ (title doesn’t display but instead some sort of img code?)

    Its almost working!

    So I’m very happy but not yet fully pleased.

    Plugin Author flocsy

    (@flocsy)

    can you also post the 2 lines before and the 2 lines after the the_title_icon in your theme’s code?

    Thread Starter master412160

    (@master412160)

    This is from teaser.php:
    Which displays in the archive (archive.php) and I also think single post but for single post there is also an other file called single.php

    <?php if(atom()->options('post_title')): ?>
        <h2 class="title">
         <?php if (function_exists('the_title_icon')) the_title_icon(get_the_ID()); ?> <a href="<?php atom()->post->URL(); ?>" rel="bookmark" title="<?php atom()->te('Permanent Link: %s', atom()->post->getTitle()); ?>"><?php atom()->post->title(); ?></a>
        </h2>
        <?php endif; ?>

    Plugin Author flocsy

    (@flocsy)

    instead of
    atom()->post->getTitle()
    try:
    atom()->post->getTitleAttribute()
    I’m not sure about the function, but in the old wordpress notation you would need the_title_attribute() instead of the_title()

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Doesn't work’ is closed to new replies.