• Resolved karyah

    (@karyah)


    Hi everyone! I’m using the Hueman theme that is really awesome one!
    I’ve tried to make a sliding subheading (i mean the string you get by placing something in input in the Theme Option -> Blog -> Subheading form) but nothing appeared to work.
    I modified in my child theme the alx_page_title() function in functions.php trying this code:

    if($subheading) {
                $title = $title.' <span><marquee behavior="scroll">'.$subheading.'</marquee></span>';
        }

    I added the marquee tag, but didn’t work.

    I changed created 2 new functions:

    function get_title_custom(){
    
    	$title = the_title();
    	echo $title;
    }
    
    function get_subtitle_marquee_custom(){
    	global $post;
    	$subheading = get_post_meta($post->ID,'_subheading',true);
    	$subheading = "<marquee behavior='scroll'>".$subheading."</marquee>";
    	if($subheading != '')
    	echo $subheading;
    }

    And i called them in the file header.php instead of the alx_page_title(), but nothing seemed to happen.
    I so would like to get this feature and i wish you can help me ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter karyah

    (@karyah)

    P.S. my website is: https://www.iknowit.it

    I found out i gone wrong with the functions and I need to change the alx_blog_title() in functions.php.

    So i changed this function part of code:

    $subheading = esc_attr( ot_get_option('blog-subheading') );

    in this one:

    $subheading = "<marquee behavior='scroll'>".esc_attr( ot_get_option('blog-subheading') )."</marquee>";

    And now i have the subheading scroll but one line under the heading and not next to it. Is that an issue about the CSS?

    It’s because your marquee is inside a <span> element. Try this css:

    .page-title span {
        display: inline-block;
    }
    Thread Starter karyah

    (@karyah)

    nothing changed. I will try to assign it ad ID and modify the CSS.

    Hmmm. I just applied that code to your site and it moved the span with the marquee tag up to the same line as the page title.

    Thread Starter karyah

    (@karyah)

    I tried this but i got the issue you answered in this post. I first need to fix that, if i can..

    Thread Starter karyah

    (@karyah)

    Okay i changed the style.css as you said before and everything was okay! Thanks. Only a little gap between the logo and the sliding text, but i think it can be fixed with some little CSS modifies, isn’t it?

    Give this a try:

    /* reduce padding under logo */
    #header .pad {
        padding-bottom: 0;
    }
    Thread Starter karyah

    (@karyah)

    didn’t work, there is the same 5-10px height gap between the fixed text and the sliding one. Now the modify is up to date on the website in the home page and you can see it.

    gap between the logo and the sliding text

    Thought you meant the logo in the heading. You currently have this in your child theme css:

    .page-title span marquee{
        display: inline-block;
        width: 90%;
        margin-left: 1%;
    }

    Try giving it a position of absolute:

    .page-title span marquee{
        display: inline-block;
        width: 90%;
        margin-left: 1%;
        position: absolute;
    }
    Thread Starter karyah

    (@karyah)

    This solution worked! Thanks bdbrown! ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to slide the subheading’ is closed to new replies.