• This is a great plugin, that works perfectly for single posts. But I am facing difficulties for the page.

    I have used PostX plugin in my page where there is a post-list widget. The widget displays a list of posts. I don’t want this post-list to display the secondary titles. In the settings, I have turned on “Only show in main posts”. In the design mode, the post-list widget displays the posts correctly, without the secondary title. But when we view the webpage, it displays the secondary titles even at the page level, within the PostX post-list widget.

    How to hide the secondary title in the widget, and display it only in a single post? Please help. This plugin is otherwise very useful, but I am not able to use it for the above reason.

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

    (@thaikolja)

    Hi @justwithjeet,

    First off, thanks for your kind words.

    Regarding your problem: If you don’t want to implement the PHP function yourself, you can also hide it with CSS.

    Let’s say you don’t want it to show in widgets. Your title format would be something kike <span class="secondary-title">%secondary_title%: </span>%primary_title%

    Then you must find out the parent class of the widgets, let’s say it’s widget-content. With the following CSS code, you can then stop it from displaying there:

    
    .widget-content .secondary-title {
       display: none;
    }
    

    However, the cleaner method would be using the PHP function and adding it to the location where you actually want it. Check the documentation for more info on that or ask me L) I’m happy to help – and maybe you can thank me with a =nice review ??

    Thread Starter justwithjeet

    (@justwithjeet)

    Hi @thaikolja

    Thanks a lot for your quick reply.

    Yes, this plugin is so awesome that it definitely deserves a good review. In fact it is hard to believe that such an useful plugin is available for no cost. Great work!

    Coming to the solutions that you suggested, I wanted to go with the first option. Although it is little hacky, but it will be quick to implement, and it does not need any change in the theme files. But I do not know how to get the parent class name for the widget. By the way, I am using the PostX plugin, and it gives us options to add blocks in the Gutenberg editor. One such block is called Post List which I am using. So I am not sure if I should call it a widget or not. But this block has a Custom CSS field. I tried the code below in that Custom CSS field, with no result.

    .secondary-title {
       display: none;
    }

    I also tried adding this code snippet in the Custom CSS field in the theme’s customizer (I am using Sinatra theme). Of course it did not work without the widget’s parent class name. So if you can kindly suggest how to dig out the parent class name for the widget or the PostX block, it will be very useful for me.

    Thanks once again for your response & support!

    Thread Starter justwithjeet

    (@justwithjeet)

    Hi @thaikolja

    I was unable to get the above code work. So ultimately I am now trying to change the title via PHP function, but it seems even more difficult. I am using Sinatra theme. I created a child theme from this. The child theme is now the active theme. I then look at the functions.php file, but I cannot figure out where I will make changes. This file seems to have nothing related to title. I even looked at header.php file, but even there I cannot find anything related to title. So I am completely lost.

    I saw the documentation. It just tells us what PHP code to be added. But it does not talk anything about where or how to add that. I understand that this implementation part depends heavily on the theme, so a generic approach cannot work always. But if we can at least get an example, using some default theme in WordPress, we will be able to replicate that for some other theme.

    I acknowledge that it is now a cross-over between your plugin and a generic guide on how to modify a theme, but you were very kind to offer help in this. I am feeling completely lost. Can you please guide me where to make changes & how?

    Thanks again!

    I have not added any review yet, because I could not get the plugin work for my posts yet. Once I can get to see it on my live website, I’ll be happy to leave a positive review.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Secondary Title is showing in PostX post list widget, but it should not!’ is closed to new replies.