Home › Forums › Theme support › Redcorner: Few Code Questions
This topic contains 11 replies, has 2 voices, and was last updated by 7Theme Support 7 years, 2 months ago.
-
AuthorPosts
-
First i want to say thanks für this great theme, i like it very much.
My Questions:
1.) single-person.php – change category divider and its colorI tried to change a divider of the categorys and found it in single-person.php in the $catterms. Changed the item from , to a unicode star, works.
Then i tried to change the color of the unicode star, but i´m unable to code it, cause normal html or css don´t work at this position.
<?php $catterms = get_the_term_list( $post->ID, 'person-category',""," ★ ","" ); $catterms = strip_tags( $catterms ); if( $catterms !="" ) { ?><p class='person-single-info-title h4'><?php _e( 'Service' , 'sevenleague' ); ?>:</p><p><?php echo $catterms; ?></p><?php } ?>
is the complete term, i changed this position:
" , " into " ★ "
How can i change the color of the unicode there ?
2.) Homepage Picture – clickable and automatic changer
The code of this position is:
[two_third boxed=true bgcol="rgba(255, 255, 255, 0.1)" col="#fff" style="min-height:495px; background:url(http://cat-exclusiv.de/wp-content/uploads/2016/05/smart_792.jpg); vertical-align:bottom" ]
First question here is, is it possible, to make this pisition clickable ? So users can click at the picture and went through to the galery.
Second question for this position. Would it be possible, to put a code here, that automatically changes this position every hour/day/week/month ?
3.) Girls galery – Time of the hoover effect
There you have a hoover effect.
At a desktop PC, you go over with the mouse and it stays, until you click.
At mobile devices, you go over with your finger, and after a second, the link works and the user wents through to the person page. This is not wanted like that.Desktop ist perfect, but not the mobile.
Can in change somewhere the time, the hoover is in progress at the mobile device ?
Can i change the function, that also at mobile device the users went on, when they click again at the hoovered picture ?I hope, my questions are understandable, looking forward to you answer. Thanks for every help.
Best regards
FrankSecond question was realy stupid 🙂
Solved this with the simple solution, to put a different slider plugin there 🙂
But i forgot a question.
4.) Hoover effect – Font Size
Where can i change the font size of the text at the hoovered picture ?
Hi,
1. To change the color of the “icon”, you can wrap it with a span tag + class, then you can add custom css code to the span, i.e.:
get_the_term_list( $post->ID, 'person-category',"","<span class='my_icon'> ★ </span>","" );
Then add the styling (color, …) in your style.css file.
2. If you use the column shortcode like in our demo content, then no, you cannot make it clickable, in this case it is better to add html code or an image + link in the column. For the automatic change of the content you should search a plugin, it’s nothing the theme can do for you.
3. We checked it, but the page only reload if you click on the part of where text is, if you hover the empty part of the field it does not refer to the single page of the person. Hover effect and mobile phones are always a problem, we can try to find a solution, and if there is a solution we can include we will make an update for the theme.
4. There is no option to change only the font size for this element, but you can change it with custom css code, you can add this css code to your style.css file:
.person_lrs, .person_entry_info, .person_entry_services_label > *, .person_entry_services, p.origin { font-size: 17px !important; }
1.) Tried it:
.my_icon { color: #a28a0a !important; }
don´t works.
Tried it the direct way:
get_the_term_list( $post->ID, 'person-category',""," <span style='color:#a28a0a'> ★ </span> ","" );
don´t works.
2.) Solved, like said, stupid question 🙂
3.) Is there any workaround, to regulate the time, between going on the pic with mobile and change to profile ?
4.) Solved, works perfect.
New Thing
5.) The google analytics code, which i put into the options, is implemented at thr wrong place. It is not in the header of the page.1: Are you sure you uploaded the updated file? Because we checked the source code and the wrapping span is not there…
3: Hm, I dont think so, because it’s an effect of the browser.
5: We checked you website but don’t so the code in the source code. Please make sure to add the complete code, i.e. :
<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview'); </script>
1. in changed it directly in the wordpress-editor and i´m not stupid…..
There you can see, the actualy implemented, direct method. It does not work. And right, i can also not see it in the sourcecode of the page.
5. I put the code there, where it belongs, in the header, but not in the options of the theme.
When i did there, it was in line 378 or deeper, this info came not from me, it came directly from the google support.
and again, i´m not stupid, this is not my first tango with wordpress or wordpress themes.
I’m sorry, we never told you stupid, you asked for help and we answered.
1. Please uncommend the next line after the line with the changes in the file single-person.php (line after “get_the_term_list( $post->ID, uncommend it with ” // ” at the beginning of the line), this should solve the problem.
5. We added the option to put the analytics code in the source code of the website to offer a fast and simple solution. As we developed the theme best practice to add the analytics code was to put it in the footer of the website, not in the header, to improve website speed. This is working without any problem. If you need a more customizable solution you can use a plugin, there are a lot of plugins out there, i.e. this one:
1.) This ist the Result, when i uncommend the Line
5.) Google Support told me, that it is not allowed to use the code there.
We checked your website and it does work, it shows only 1 star between the entries. Have you solved the problem already?
It showas only one star from the start between the entries, that is not the problem.
Like wrote in the first post, the stars have not the color, they should have from the code.
You answered with a style code and both version, using a class and enter the style directly, don´t change the color of the star into the wanted.
using this:
get_the_term_list( $post->ID, 'person-category',"","<span class='my_icon'> ★ </span>","" );
with settings in the style.css don´t work and also this:
get_the_term_list( $post->ID, 'person-category',""," <span style='color:#a28a0a'> ★ </span> ","" );
does not work, the star always stays white.
We tested your code on our test server and on our end it was working without any problem. Checked your source code and the wrapping code is missing, not sure what went wrong, but I’m sure it is not a problem with our theme, because the function is a WordPress function. If you want, you can send us ( inf o @ 7theme . net ) a login for your website, then we can check your code / backend for the problem.
-
AuthorPosts
You must be logged in to reply to this topic.