clareswindlehurst
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Hueman] Ad Adsense block in sidebar of hueman themeJust an update to say if you insert the ad code directly into sidebar.php it works. So this seems to be a problem with inserting into widgets. I’ve never had such an issue before but can’t understand how this can be theme related…
Forum: Themes and Templates
In reply to: [Hueman] Ad Adsense block in sidebar of hueman themeI’m having the same problem. I have added an adsense block to my header.php and single.php files by pasting the code in and they appear just fine. but when I use a text widget to try and put an ad in the sidebar I just get a blank space.
Forum: Themes and Templates
In reply to: WP Nav Menu Dissapears in Category Pages!I feel like I’ve been going round in circles on this one for weeks with menus appearing and disappearing. I’ve now ditched the filter from the functions and inserted nickkeenan’s code into the loop for category, tag and home and all seems to be ship shape!
Forum: Fixing WordPress
In reply to: Permalinks issue including the word "date"Here’s the answer:
RewriteRule ^date/(.+)$ https://www.domain.com/$1 [R=301,L]
No luck I’m afraid. I added in that line, re-updated the plugin and the same problem occurred.
I’m just re-reading the codex instructions to ensure I have set the loops up properly, though it is odd that they work perfectly fine until I update the plugin.
Not sure if I did that right – never used Pastebin before. Here’s the link just in case: https://pastebin.com/Kqspar6S
See below for link
oops sorry yes.
I’m using the TwentyTen theme as a base so the code looks like this:
[Code moderated as per the Forum Rules. Please use the pastebin]
It works fine when I roll back the plugin to the older version.
Hello.
No – get_header is called within the header.php file and then I am using the loop within the home.php file.
Forum: Fixing WordPress
In reply to: [Plugin: Custom Field Template] Use Media Picker and output imageAmazing what a night’s sleep can do.
Here is the answer in case anyone else needs it:
<?php
global $wp_query;
$postid = $wp_query->post->ID;
$imageid = get_post_meta($postid, ‘hh-product-image’, true);
?>
<?php echo wp_get_attachment_image($imageid, $size=array(70,70)); ?>Oh my goodness – I spent 6 hours yesterday looking for a solution to this so thank you @pierrepernix for posting the answer!
Just in case anyone is interested in placing the image attachment output outside of the loop (in the header for example) the code that works is:
<?php
global $wp_query;
$postid = $wp_query->post->ID;
$imageid = get_post_meta($postid, ‘hh-product-image’, true);
?>
<?php echo wp_get_attachment_image($imageid, $size=array(70,70)); ?>