• Resolved jodamade

    (@jodamade)


    Hey guy,

    this plugin is great – but I need your help.

    Check out the site https://www.minidealz.de/

    Problem 1: On first page of homepage the second title appears. (The price in titles(second line))
    But if you scroll down and click for next page -> on next page there isnt the secondary title in each posttitle ..

    Its only on homepage. In every category on every page it appears. Can you help?

    Problem 2: Go into a post -> hover a social media icon to share this post. The alt text includes the text of the secondary title with formation.
    How can i delete the secondary title off ALL Alt-Text?

    Thank you!

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

    (@thaikolja)

    Hi @jodamade,

    Problem 1: It looks like your theme is overwriting the output. There are several ways to fix this, but without knowing the full code of your template and giving me access to test it myself, I can’t give you a snippet for your to copy and paste. If you’d like me to fix this for you myself, please contact me privately via kolja@koljanolte.com.

    Problem 2: We’ve had this issue recently somewhere else in another thread. Short answer: You’d have to insert the get_secondary_title() PHP function manually into your theme. Since I’ve no idea what theme files display those icons, I can’t give you a direct instruction. Again, if you feel comfortable in giving me direct access, I’d offer to fix it for you.

    Plugin Author thaikolja

    (@thaikolja)

    After working together with @jodamade, the issue has been fixed. In case other users encounter the same problem, follow these steps:

    1. Find and open the file that contains the previous/next page function (usually the_post_navigation()).

    2. Insert the following code above the function:

    $previous_post_secondary_title = “”;
    $next_post_secondary_title = “”;

    if(function_exists(“get_secondary_title”)) {
    $previous_post = get_previous_post();
    $next_post = get_next_post();

    $previous_post_secondary_title = get_secondary_title($previous_post->ID);
    $next_post_secondary_title = get_secondary_title($next_post->ID);
    }

    3. Add the variables $previous_post_secondary_title and $next_post_secondary_title to the location where you’d like it to be displayed. Example:

    the_post_navigation(
    array(
    ‘next_text’ => ‘<span class=”meta-nav” aria-hidden=”true”>’ . __(‘Next’, ‘afterlight’) . ‘</span> ‘ . ‘<span class=”screen-reader-text”>’ . __(‘Next post:’, ‘afterlight’) . ‘</span> ‘ . ‘<span class=”autor”>’ . $next_post_secondary_title . ‘</span><span class=”post-title”>%title</span>’,
    ‘prev_text’ => ‘<span class=”meta-nav” aria-hidden=”true”>’ . __(‘Previous’, ‘afterlight’) . ‘</span> ‘ . ‘<span class=”screen-reader-text”>’ . __(‘Previous post:’, ‘afterlight’) . ‘</span> ‘ . ‘<span class=”autor”>’ . $previous_post_secondary_title . ‘</span><span class=”post-title”>%title</span>’
    )
    );

    • This reply was modified 6 years, 8 months ago by thaikolja.
    • This reply was modified 6 years, 8 months ago by thaikolja.
    Plugin Author thaikolja

    (@thaikolja)

    – Duplicate post; just ignore me –

    • This reply was modified 6 years, 8 months ago by thaikolja.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Secondary title – next pages and ALT-Text’ is closed to new replies.