• Resolved atomikpop

    (@atomikpop)


    I have manually entered the secondary title in a custom featured post widget. However, I cannot style the output. I believe I need to create a span class, but I need to know what file to create it in — should I edit functions.php or the php file associated with the custom widget?

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

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

    (@thaikolja)

    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.

    Thread Starter atomikpop

    (@atomikpop)

    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.

    Plugin Author thaikolja

    (@thaikolja)

    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.

    Thread Starter atomikpop

    (@atomikpop)

    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.

    Thread Starter atomikpop

    (@atomikpop)

    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.

    Thread Starter atomikpop

    (@atomikpop)

    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
    Plugin Author thaikolja

    (@thaikolja)

    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.

    Thread Starter atomikpop

    (@atomikpop)

    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.

    Plugin Author thaikolja

    (@thaikolja)

    Of course, feel free to submit your support question at any time and I’ll try to help as much as I can 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Span Class and CSS’ is closed to new replies.