Simple Probléme in wordpress

You’ll have to give a little more explanation. But I think that the problem is that you are using get_template_directory_uri() as an anchor link. What get_template_directory_uri() does is to give you the URL of your theme, for instance you can get your “/assets/images” folder like this. If your site structure is “theme_folder/page1.php” then I recommend … Read more

Trying to get this function to show below the content

If it was me I’d not echo the text I’d make it a variable e.g. $additional_text = “” then at the end of the function return $additional_text;. if (have_posts()) : while (have_posts()) : the_post(); $additional_text=”<div class=”timeline”>”; $additional_text .= ‘<a href=”‘; $additional_text .= the_permalink(); $additional_text .= ‘”><h3>’; $additional_text .= the_title(); $additional_text .= ‘</h3></a>’; $additional_text .= ‘</div>’; … Read more

Send email notification when meet the condition

You can use this code to automatically send an email whenever a post of the type one is published. This goes into your theme’s functions.php : <?php function post_published_notification( $ID, $post ) { $type = get_post_type($ID); if ($type == ‘post-type-one’){ $author = $post->post_author; /* Post author ID. */ $name = get_the_author_meta( ‘display_name’, $author ); $email … Read more

Add custom css to theme

You need to make sure that your css goes between style tags. Try changing this line: .btn { background-color:<?php echo esc_attr($btn_color);?>; } <?php to <style>.btn { background-color:<?php echo esc_attr($btn_color);?>;</style> } <?php

Problem with function.php.. like

That’s a backdoor code injected probably caused by a nulled theme or plugin in your site. I’m having the same issue. The solution is to scan the whole site and get rid of everything you haven’t paid for.