Wordpress - TwenteenSeventeen picture instead of a title - css

I'm really new in coding, especially in css. I already read some tutorials but I like to change a specific thing. For my Website I use Wordpress. I also edited a few things in my CSS which already worked. Now I can't find a answer for how I can replace the title with a custom picture.
Click here to watch a picture to understand what I mean.
Click here to acess my website.
I already tried some things, but it would be nice if someone can explain me how to do it.

You can edit header.php in the twenty seventeen to display only a picture.
This source code is on your wordpress server in wp-content/themes/twenty-seventeen/header.php: https://github.com/WordPress/twentyseventeen/blob/master/header.php
You'll want to replace line 31:
<?php get_template_part( 'components/header/header', 'image' ); ?>
With something like
<img src="banner.png" />
You'll have to adjust the location of banner.png to where you actually upload the image.
After you've got that working and it's basically what you want, you can wrap the image tag in a a tag so the banner links back to your home page, if you'd like.

Related

remove and disable featured image in posts

I write a post in new post editor and then add media. I can see the images in the editor but when i publish them they aren't loading up and a frame with little square in the middle comes up. This is the link to one of my posts: http://getprogramcode.com/2013/03/c-program-for-bit-stuffing/ . For some people only link to the image comes up and it opens up with 404 error. See the line after OUTPUT: bit stuffing.
Also i want to remove the featured image from appearing in my posts. I have a option in my theme on a new post: "disable featured image" - but that doesnt work . Also if i dont put the image or i remove the featured image the empty image appears: see the home page: http://getprogramcode.com Please help me to solve this problem
You should not use relative paths on WordPress, only Absolute paths.
The problem is that you are using ../wp-content/... as your URL's for image paths.
When adding images, you should have the option to give it a path, you should opt to link to the media file.
For the disable feature image, if you go into the page.php or single.php code, it should have a line of code in it for calling in the featured image.
It should look something like this:
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
?>
You just need to remove or comment out this code and it should stop showing up on the pages.

The URL added while adding featured image in wordpress

I am working with wordpress latest version.
As in wordrpess, we can add URL while adding a featured image in a post as there are text fields like caption, title, alt text, description, URL etc.
I've added a link like http://example.com/abc-news
I am fine to show the featured image in the blog post but I want that link as
{featured-image}
So that, if anyone clicks on the featured image he/she will go to that link.
Any help would be appreciated.
If you are using the default theme with the latest version of WordPress, you can edit content.php in the 2014 theme directory.
You need to wrap <?php twentyfourteen_post_thumbnail(); ?> with the link code pointing to your URL.
This code should be around line 13 in content.php.
<?php twentyfourteen_post_thumbnail(); ?>
To link to the current blog post, you could add this code:
<?php twentyfourteen_post_thumbnail(); ?>
If you are using a different theme than the default, open the file which contains The Loop in your theme, search for the_post_thumbnail or a similarly named function, and change the code as above.
The exact answer will vary depending on theme, but 98% of the time the fix should be similar to the above. Hope this helps.
Edit: Here's some more information: http://codex.wordpress.org/Function_Reference/the_post_thumbnail#Post_Thumbnail_Linking_to_the_Post_Permalink
Thanks for your prompt reply.
You are right that it's 98% depending on the theme.
The theme is using a meta_value to add a custom URL for the featured image.
So, I need to get that URL through get_post_meta
I've got from here.
And I am fine with it now. :-)
Thanks

Editing Wordpress Ajaxify Theme

I have installed Ajaxify theme on my site (tekstyleankara.com). At the head of the it writes website's name on red background. I want to put the logo of the company there. How can I do that? Thanks.
I think I need to edit this line in header.php :
<div class="logo grid_2">
<h1 class="site-title"><?php bloginfo( 'name' ); ?></h1>
</div>
But I couldn't find out what I should write instead. I made several attempts but they didn't work.
For this you need to edit your stylesheet Theme.css file. To find this file you need to go to your admin panel of wordpress. There you can click appearance at the right side of your page and click on the editor. There you see the file theme.css. You need to edit it and search the line .logo. From there you can change your red background with your logo.

Adding A Button Between post-content and Related Posts Thumbnail Plugin on WordPress

I am trying to add a button to my WordPress template. Basically, I have the post and then there is the Related Posts Thumbnails widget that appears. I want the button to go between the text of the post and the related posts thumbnail widget. The code in my 'Single Post' that contains all of this is as follows:
<div class="post-content">
<?php the_content(__('<em><strong>More:</strong> Read the rest of this entry...</em>', 'life-is-simple')); ?>
</div>
I know the Related Posts Thumbnails plugin falls within this code because it's at that place when I 'Inspect Element' on Google Chrome. I can't find how to edit the order of things within that div though. Any help would be greatly appreciated, thanks!
EDIT
Clarification: I am using the Life Is Simple WordPress theme although it has been custom editing quite a bit (mostly on the CSS side of things though).
That plugin is probably appending the output to the_content with a filter .
That means , that the output is being added to the_content automatically. it is a common behaviour.
You need to look at the pluginĀ“s admin interface to see if you can have an alternative way (I believe there is ) which is using a template tag. in that case, you should put the template tag after the div where the the_content() is .
EDIT I :
After a small dig, - in fact there is - you need to put
<?php get_related_posts_thumbnails(); ?>
Then the plugin should know by itself not to append to the_content.
For parameter passing, or if something is not working, go read their APi or help files.
You'll probably need to edit single.php or archive.php in your theme. If nothing is occuring there that looks familiar, it's probably using a loop. In which case you might find what you are looking for either in loop.php, loop-single.php, or loop-archive.php depending on what type of page you are on and how the theme was constructed. Add your button near where you find Read the rest of this entry...
With more information (such as what theme you are using), one might be able to help more as well.

Permalink-safe way to link pages inside footer.php

I am currently building a new theme for my site and am kind of stuck not knowing the proper way to link pages together. What is the proper way to direct visitor to another page if I were to write the link straight into footer.php?
Let's consider the following inside footer.php:
?>
A Link
<?php
That would work well up until I were to change my permalink structure to something else.
What is the proper way to do it(without using WP built in menus or anything similar)?
You can use get_permalink assuming your pages are in Wordpress.
See this link: http://codex.wordpress.org/Function_Reference/get_permalink
The above answer is 100% correct, but to save people some time when they stumble upon this question, I took the liberty of writing it out.
<?php echo get_the_title(12); ?>
This covers everything from hover text to dynamic page title, so if you decide to change "Contact" to "Contact Us," you won't have to remember to update the footer.php file.

Resources