chesthairtoupee
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WP redirects to the wrong front pageThank you very much ??
Is the “plain” setting some kind of reset button for the link structure?
Forum: Fixing WordPress
In reply to: WP redirects to the wrong front pageYes. When I reverted to “plain” it loaded the correct front page.
Forum: Fixing WordPress
In reply to: WP redirects to the wrong front pageI have chosen “month and name”.
Forum: Fixing WordPress
In reply to: Problem with image display in echo commandI copied the header.php from the parent theme into the child theme. In this file, I added this line to the header-div tag:
<?php do_action('header_div_hook'); ?>
In my functions.php I added a function that makes use of this hook:
function change_header_div() { if (is_page()) { echo ' <figure> ........ </figure> '; } } add_action('header_div_hook', 'change_header_div');
I don’t know if this approach is good, but my objective was to outsource as many changes as possible to the functions.php and not doing all the changes directly in the .php files, because in the latter case it is easy to lose track of all the changes. DOM tree traversal would be a better solution, but I don’t know how this could be done.
Forum: Fixing WordPress
In reply to: Problem with image display in echo commandI noticed that my approach was wrong, because
wp_head
is not suitable to output HTML into a div tag of the header, because the div tag “header” has nothing to do with the HTML tag<head>
.Forum: Fixing WordPress
In reply to: Problem with image display in echo commandThanks, that worked ?? I added this code to the functions.php:
add_action( 'wp_head', 'custom_header' ); function custom_header() { echo ' <figure class="header_image"> <a href="https://www.ads-software.com" target="_blank" alt=Test> <img src="'.get_bloginfo('stylesheet_directory').'/images/test.png" title="Test link" width="20" height="20"/> </figure> '; }
What I haven’t grasped yet is how to align the figure container at some other container.
Forum: Fixing WordPress
In reply to: Problem with image display in echo commandI did that but I get this path:
https://localhost/wordpress/wp-content/themes/responsive/test.pngbut the image path is:
https://localhost/wordpress/wp-content/themes/responsive-child/test.pngForum: Fixing WordPress
In reply to: Problem with image display in echo commandI found the error: The image URL is not correct, but I don’t understand why. The child theme was automatically created with “Child Theme Configurator”. This is what I did:
1. I created a child theme of the “responsive” theme (https://www.ads-software.com/themes/responsive/).
2. I added a test.png image in the root folder of the child theme.
3. Then the image should be displayed by the code above which I placed in ..responsive-child/function.php, but for whatever reason the image path is not ..responsive-child/test.png, but instead ..responsive/test.png. So this call.get_bloginfo('template_directory')
from within the child theme uses the parent theme path.Forum: Fixing WordPress
In reply to: Problem with image display in echo commandThanks. I changed the code to this and I don’t get an error anymore:
echo '<img src="'.get_bloginfo('template_directory').'test.png" >';
However, I can only see a placeholder and not the image.
Forum: Fixing WordPress
In reply to: Best practice to customise hooks and functionsMaybe this theme is better for customisation:
https://www.ads-software.com/themes/responsive/Anyway, I’m not sure how to setup the child theme, because this theme contains multiple .css and multiple .js files.
Forum: Themes and Templates
In reply to: Changing colours via CSSThanks. Is it recommendable to use global variables in CSS?
Forum: Fixing WordPress
In reply to: Best practice to customise hooks and functionsWhat is so special about the Twenty-theme-series? As a WP newbie I don’t know which themes are well written and easily customisable, so I just chose one that had a good rating. Are there some characteristics that help me to decide if a theme is well written or not? “Attitude” and “Graphy” have also good ratings, but I don’t know how well they are written.
What happens if you build a website based on a certain theme and later, after adding plugins and pages, you decide to change the theme? Could that be risky in some cases and could it happen that your website breaks or is the theme completely decoupled from the content and website structure?
Forum: Themes and Templates
In reply to: Changing colours via CSSThanks, that has worked ??
Does it mean that other menus with individual colours are custom-made? Here for example, the selection background of the mobile menu has a custom color: https://www.ads-software.com/themes/corpbiz
Forum: Themes and Templates
In reply to: Changing colours via CSSHere is a link to the demo:
https://de.www.ads-software.com/themes/clean-retinawhen you push a “read more” button, you come to a post. On the bottom of it you see a blue bar at the top of the small arrow. when you make the website switch to mobile mode, you can see the blue selection background in the mobile menu. I would also like to change this colour.
Is it possible to use some kind of global variables in CSS?
Forum: Themes and Templates
In reply to: Changing colours via CSSAre the links correct now? I’m using WP locally, but basically I’m just playing around with the standard “clean retina” theme. What I’m doing is just for learning purposes because being able to change theme colours is really necessary to get something useful done.