Forum Replies Created

Viewing 15 replies - 1 through 15 (of 60 total)
  • Thread Starter DancingFighterG

    (@dancingfighterg)

    Ok, figured it out:

    add_filter('tc_colophon_left_block', 'my_social');
    function my_social(){
    	$social = "<span class='st_plusone_hcount' st_title=' . the_title() . ' st_url=' . the_permalink() . '></span><span class='st_fblike_hcount' st_title=' . the_title() . ' st_url=' . the_permalink() . '></span><span class='st_twitter_hcount' st_title=' . the_title() . ' st_url=' . the_permalink() . '></span>";
    	return '<div class="span4 left-social">'.$social.'</div>';
    	}
    Thread Starter DancingFighterG

    (@dancingfighterg)

    Tried using the code and it threw an error:

    Parse error: syntax error, unexpected ‘<‘ in /home/content/10/3671710/html/shadesofhappiness/wp-content/themes/hd/functions.php on line 8

    Here is the code:

    add_filter('tc_colophon_left_block', 'my_social');
    function my_social(){
    	$social = <span class='st_plusone_hcount' st_title=' . the_title() . ' st_url=' . the_permalink() . '></span><span class='st_fblike_hcount' st_title=' . the_title() . ' st_url=' . the_permalink() . '></span><span class='st_twitter_hcount' st_title=' . the_title() . ' st_url=' . the_permalink() . '></span>;
    	return '<div class="span4 left-social">'.$social.'</div>';
    	}
    Thread Starter DancingFighterG

    (@dancingfighterg)

    I fixed this issue so we are good. Thanks

    Thread Starter DancingFighterG

    (@dancingfighterg)

    Running into a little bit of an issue with this HTML. The plugin produces the following HTML for me to use:

    HTML

    <span class='st_plusone_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span>
    <span class='st_fblike_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span>
    <span class='st_twitter_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span>

    Javascript

    <script charset="utf-8" type="text/javascript">var switchTo5x=true;</script>
    <script charset="utf-8" type="text/javascript" src="https://w.sharethis.com/button/buttons.js"></script>
    <script charset="utf-8" type="text/javascript">stLight.options({"publisher":"94b5dc9a-b16f-440c-9d60-4f4cf5ac4cc4"});var st_type="wordpress3.9.1";</script>

    I don’t know if I need just the html or both in the function. Also, in the html its called some php so I need to know the proper syntax to be able to put this in the function.

    Thread Starter DancingFighterG

    (@dancingfighterg)

    Ok, figured it out:

    add_filter('tc_colophon_right_block', 'my_imageandtop');
    function my_imageandtop(){
    	$img_url = get_stylesheet_directory_uri().'/imgs/hdfooterlogo.png'; //put your image in child-theme/imgs
    	$backtop = '<div class="span4 backtop"><p class="pull-right"><a class="back-to-top" href="#">Back to top</a></p></div>';
    	$width = '250px';
    	$height = '79px';
    	$img = '<a href="https://www.hunterdouglas.com/" target=_blank><img alt="logo" src="'.$img_url.'" width="'.$width.'" height="'.$height.'" class="pull-right"></a>';
    	return '<div class="span4 right-image"> '.$img.' </div> <div class="span4 right-backtop"> '.$backtop.' </div> ';
    	}

    The main thing from the hooks article is the fact that I needed to use standard html in the variables.

    Thanks

    Thread Starter DancingFighterG

    (@dancingfighterg)

    I have the following code working to place an image in the right block

    add_filter('tc_colophon_right_block', 'my_imagetop');
    function my_imagetop(){
    	$img_url = get_stylesheet_directory_uri().'/imgs/hdfooterlogo.png'; //put your image in child-theme/imgs
    	$width = '250px';
    	$height = '79px';
    	$img = '<a href="https://www.hunterdouglas.com/" target=_blank><img alt="logo" src="'.$img_url.'" width="'.$width.'" height="'.$height.'" class="pull-right"></a>';
    	return '<div class="span4 right-image">'.$img.'</div>';
    	}

    Now I’m trying to if I can have the back to top link and the image be in the same right block. When I try to do it the image overrites the back to top link. Here is the link that I want to add:

    sprintf('<div class="%1$s"><p class="pull-right"><a href="#">%2$s</a></p></div>)

    I see in the function.php for the base theme that there is a function for the back-to-top. I’ve been trying to use the html in there to get it to show up in this custom function but I’m not having any luck

    Thread Starter DancingFighterG

    (@dancingfighterg)

    Hey ElectricFeet,

    I will try this on the left block with the social media code that I have.

    Thread Starter DancingFighterG

    (@dancingfighterg)

    Looks like I would need to place the code for the social links into the:

    tc_colophon_left_block

    Can I get some help on the code for this?

    Thread Starter DancingFighterG

    (@dancingfighterg)

    Ok, I’ve been trying for the longest to get this code to work but I am having some issues:

    add_filter('tc_colophon_right_block', 'my_imageandtop');
    function my_imageandtop(){
    	$img_url = get_stylesheet_directory_uri().'/imgs/hdfooterlogo.png'; //put your image in child-theme/imgs
    	//$backtop =  sprintf('<div class="%1$s"><p class="pull-right"><a class="back-to-top" href="#">%2$s</a></p></div>', 'Back to Top');
    	$width = '250px';
    	$height = '79px';
    	$img = '<a href="https://www.hunterdouglas.com/" target=_blank><img alt="logo" src="'.$img_url.'" width="'.$width.'" height="'.$height.'" class="pull-right"></a>';
    	return '<div class="span4 right-image"> '.$img.' </div>';
    	}
    Thread Starter DancingFighterG

    (@dancingfighterg)

    Is there anyway to make the existing functionality in the theme that puts social media links in the nav and footer the ability to share the page that its on? I love the images that are being used rather than the default ones

    Thread Starter DancingFighterG

    (@dancingfighterg)

    Ok, now I just have to figure out how to get this code to show up in the following block:

    tc_colophon_right_block

    There is a spot for it but modifying the exist block to show it I will need some help with:

    add_filter('tc_colophon_right_block', 'my_social');
    function my_social(){
    	$img_url = get_stylesheet_directory_uri().'/imgs/hdfooterlogo.png'; //put your image in child-theme/imgs
    	$width = '250px';
    	$height = '79px';
    	$img = '<a href="https://www.hunterdouglas.com/" target=_blank><img alt="logo" src="'.$img_url.'" width="'.$width.'" height="'.$height.'" class="pull-right"></a>';
    	return '<div class="span4 right-image">'.$img.'</div>';
    	}
    Thread Starter DancingFighterG

    (@dancingfighterg)

    Ok, so I was able to get the image and back to top link to exist in same span by moving the logo to the tc_colophon_left_block and having the back to top link to occupy the tc_colophon_right_block. I would still like to figure out how to have both of them exist in the same block.

    Thread Starter DancingFighterG

    (@dancingfighterg)

    In the theme is has the ability to place the social media icons in the left corner. I would like to have the social media share buttons there. What would need to be modified to make this happen

    Thread Starter DancingFighterG

    (@dancingfighterg)

    I have some html that will work:

    (JAVASCRIPT)
    <script charset="utf-8" type="text/javascript">var switchTo5x=true;</script>
    <script charset="utf-8" type="text/javascript" src="https://w.sharethis.com/button/buttons.js"></script>
    <script charset="utf-8" type="text/javascript">stLight.options({"publisher":"94b5dc9a-b16f-440c-9d60-4f4cf5ac4cc4"});var st_type="wordpress3.9.1";</script>
    
    (HTML)
    <span class='st_plusone_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span>
    <span class='st_fblike_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span>
    <span class='st_twitter_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span>

    The only issue I have right now is the placement. I would love to have the buttons in the left corner as I don’t like it in the grey bar area

    Thread Starter DancingFighterG

    (@dancingfighterg)

    So you are saying to use the plugin and place some HTML to replicate what the plugin is doing?

Viewing 15 replies - 1 through 15 (of 60 total)