Support » Plugin: Secondary Title » Show Secondary title on single page

  • Hi,
    I’d like to show secondary titles only on my homepage (ID=6633) where i have Elementor posts widgets displaying titles. Is there a way to do that ?

    Thanks !

    The page I need help with: [log in to see the link]

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

    (@thaikolja)

    Hi @zabriskie73,

    Thanks for your post.

    Since Elementor works fundamentally differently from “normal” WordPress plugins (it creates all markup via shortcodes), I’d recommend doing it via PHP.

    For that, you have to find the file or function that displays the mentioned widget and then add something like this, assuming the <?php tag is already open:

    if(function_exist( 'get_secondary_title' )) {
    	$secondary_title = get_secondary_titke(get_the_ID());
    ?>
    	<h3>
    		<span class="secondary-title">
    			<?= get_secondary_title(); ?>:
    		</span>
    		<span class="primary-title">
    			<?= $widget_title; ?>
    		</span>
    	</h3>
    <?php
    }
    else {
    	echo $widget_title;
    }

    Don’t forget to go to Secondary Title’s settings page and turn off “Auto show”.

    Please note that I didn’t test this code since I don’t have Elementor and your active theme. But this is basically the way to achieve what you have in mind. Two other possible solutions come to mind, but I can already tell that they are most likely unreliable and therefore should be avoided.

    If that’s too complicated for you or you have difficulties understanding the code, I could offer to assist you by implementing it myself (I only do this for friendly users like you šŸ˜‰).

    If you’re okay with this, I’d need at least the theme files (both the main theme and, if there is one, the child theme). But to get 100% working results, I need a clone of your entire website. This can be done with a few clicks with the plugin BackupBuddy, which you can download from my repository.

    Steps:

    • Go to the dashboard, click Install, and select the .zip file of the plugin you’ve just downloaded
    • Activate the plugin
    • Navigate to the BackupBuddy menu item in the dashboard and select Settings
    • Under General, enter admin in the Import password field and again to confirm it. Then save the page
    • Go to Backups, hit Skip Setup Wizard for Now and choose Complete backup
    • Depending on how big your WordPress installation is, it may take a few minutes to complete. Once it’s done, hit the download button which will let you download a .zip file that you can (and should) delete after the download is complete (for security reasons)
    • Do not rename the .zip file and share it with me, preferably on a cloud service like Google Drive and share it with me only (also for security reasons) by using the email kolja.nolte@gmail.com
    • Send me the link to the uploaded file via the same email address
    • I’ll take over from there and give you back the working version with a detailed explanation of how I did it so that you can do it yourself if you happen to get into the same or a similar situation again in the future.

      I hope my individual support attempt is acceptable to you.

    Thread Starter zabriskie73

    (@zabriskie73)

    Hi Thaikolja,

    Thanks for your prompt response and your amazing support.
    First, i confirm i want to use secondary title only on the homepage of http://www.canalanimal.fr (red titles), not internal pages or post themselves (for the post themselves, i’m using a trick to avoid displaying secondary title into them) .

    About BackupBuddy, i don’t how to find you repository. Is it a free download ? Because i really can’t invest to buy the plug-in on the ithemes website.
    For the record, i’m using “Hello Theme” (from Elementor team) with child theme.

    Let me know the next step.

    Thanks !

    PS : My website is only optimized for desktop computers, not mobiles yet !

    • This reply was modified 6 months, 2 weeks ago by zabriskie73.
    • This reply was modified 6 months, 2 weeks ago by zabriskie73.
    Plugin Author thaikolja

    (@thaikolja)

    Yes, @zabriskie73, it’s a free download, I have unlimited licenses for this plugin. You can download it and use it without any worries.

    Here’s the link:
    https://gitlab.com/wordpress-premium/backupbuddy/-/archive/master/backupbuddy-master.zip

    Please let me know once you’ve downloaded it so I can remove the link again from the forum.

    Thread Starter zabriskie73

    (@zabriskie73)

    Ok many thanks thaikolja, i’ve downloaded the plug-in, you can remove the link and will send you the backup soon.

    Best,

    • This reply was modified 6 months, 2 weeks ago by zabriskie73.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show Secondary title on single page’ is closed to new replies.