Hi @atomikpop,
First off, could you tell me what you mean by “manually entered the secondary title in a custom featured post widget”? The shortcode? A PHP function? I need to know that.
I used echo get_secondary_title.
I’d prefer to use a div class but when I try to create a div it breaks my site.
Where did you use that? In the .php file of the widget?
If HTML tags mess up your site, it might be that you either forgot to close the tag (</...) or that you gave it a class or ID that has already been in use.
Some screenshots and the actual code would help giving you more accurate support.
Yes, I have an echo statement in the php file of the widget.
I have tried inline style, span class, and div class.
I have saved the div code here – https://atomikpop.com/farel
Nothing seems to work.
I have created a class php file that extends the Genesis Featured Post widget (see https://sridharkatakam.com/relocate-titles-genesis-featured-posts-widgets-output/).
When I use echo the_secondary_title() it works but has no style.
I have tried the following:
echo ‘<span style=”color: blue;”>’the_secondary_title()'</span>’;
However, the echo command immediately above crashes my site.
Finally got it to work using:
echo “<div class=’secondary-title’>”. get_secondary_title() .”</div>”;
Also found an error in my style.css file that may have been causing issues.
Thanks for your assistance , Kolja – I appreciate your time.
-
This reply was modified 7 years, 10 months ago by
atomikpop. Reason: Corrected a typo
Hi @atomikpop,
Great to hear you’ve resolved this issue. You were missing the dot-connectors, right?
If you need any more assistant, please let me know.
Yes, and some of the tutorials I read on various help sites seemed to provide conflicting advice regarding double-quotes versus single-quotes. The dot-connectors and double-quotes were what I needed to use:
echo “<div class=’secondary-title’>”. get_secondary_title() .”</div>”;
Next, I may want to remove the secondary title from my single-post pages. If I need help with that I will open another support request. This has been a very educational exercise — I am a beginner at coding — and I really appreciate your help.
Of course, feel free to submit your support question at any time and I’ll try to help as much as I can 🙂