Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author thaikolja

    (@thaikolja)

    Hi and sorry for the late reply.

    I’m not sure if I understand you correctly. Do you want to display both titles where the standard title is? Or do you want to include it in the post content?

    If it’s the first, you may use “Insert automatically” and a “Title format” that contains both %secondary_title% and %title% (for example <span style="color:red;font-size:14px;">%secondary_title%</span>).

    If it’s the second, there’s unfortunately no way to display it in the post editor when editing/creating a post (via shortcodes, for example). Even if you don’t mean this, I’m going to add a shortcode within the next version (0.9), just in case.

    Let me know if you’ve fixed it.

    Thread Starter pfw80

    (@pfw80)

    That would be the second. I just need to display both titles not only on blog/home pages, but also on posts page (but acctually, the way it’s displayed would have to be customized separately from blog/home page settings).

    Plugin Author thaikolja

    (@thaikolja)

    Now I’m a bit confused, lol. So what you want is displaying the secondary title when viewing a single post, somewhere near the standard title? That should be working already if you use “Insert automatically”.

    You can style the output individually with CSS (see the FAQ for more). If that isn’t enough, you can always fall back to deactivating “Insert automatically” and use <?php echo get_secondary_title(); ?> or <?php the_secondary_title(); ?>.

    But know knows, maybe I still get you wrong, lol.

    Thread Starter pfw80

    (@pfw80)

    I see, then it’s not working for me
    example of post: https://intokino.com/beats-of-freedom-rez-leszek-gnoinski-wojciech-slota-2010/ (main title is “Beats of freedom etc…”, secondary title is not displayed anywhere)

    the same post on blog page:
    https://intokino.com/blog-3/page/2/
    you can see Secondary Title above the title

    “insert automatically” is on.

    Plugin Author thaikolja

    (@thaikolja)

    Well that’s weird. There’s not much coming to my mind when thinking about how to solve this since I don’t even understand that bug. Maybe 2 things:

    1. Try to deactivate “Only show in main post”.
    2. Find out the line in your single.php that calls the post title (is it get_the_title(); or the_title();?). Must be somewhere near here:

    <!-- Page Title, Category, Post Information ================================================== -->

    Thread Starter pfw80

    (@pfw80)

    1. I tried it several times, and many combimnations, still nothing
    2. there is no function get_the_title in single.php, I only see echo the_title 3 times

    [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]

    ?php if ($popup == 'On') { ?><a>" rel="prettyPhoto[pp_gal]" title="<?php if ($alt) { echo str_replace('"', "", $alt);  } else { echo the_title(); } ?>"><?php }?><img src="<?php  echo $thumb[0]; ?>" alt="<?php if ($alt) { echo str_replace('"', "", $alt); } else { echo the_title(); } ?>" title="<?php print_r($caption); ?>" class="scale-with-grid" data-thumb="<?php  echo $thumb[0]; ?>"/><?php if ($popup == 'On') { ?></a><?php }?>
                      <?php $counter = 2;
                      while ($counter < ($thumbnum)) :
                        if ( ${'thumb' . $counter}) : ?>
                          <?php if ($popup == 'On') { ?><a>" rel="prettyPhoto[pp_gal]" title="<?php if (${'alt' . $counter}) { echo str_replace('"', "", ${'alt' . $counter}); } else { echo the_title(); } ?>"><?php }?><img src="<?php  echo ${'thumb' . $counter}[0]; ?>" alt="<?php if (${'alt' . $counter}) { echo str_replace('"', "", ${'alt' . $counter}); } ?>" title="<?php if (${'caption' . $counter}) { echo str_replace('"', "", ${'caption' . $counter}); } ?>" class="scale-with-grid" data-thumb="<?php  echo $thumb[0]; ?>"/><?php if ($popup == 'On') { ?></a><?php }?>
                        <?php endif; $counter++;
                      endwhile; ?>
                    </div>
                  </div>
    		  </div>
              <?php endif;
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Secondary title on single post page’ is closed to new replies.