Chris-Kay
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [DevDmBootstrap3] Adding a container Div around dropdown menuOk thanks, will take a look.
Forum: Themes and Templates
In reply to: [DevDmBootstrap3] Adding a container Div around dropdown menuSry double post
Forum: Themes and Templates
In reply to: [DevDmBootstrap3] Adding a container Div around dropdown menuHey DevDM,
Thanks for getting back to me so quick. To answer your question no, not really.
I have the main nav in a Container. I want the dropdown background to span the full width of the page (outside the parent nav container) with the dropdown ul as a container so it get centered. Only way to achieve that is to put a wrapping container around the dropdown ul and the have the ul with margin: 0 auto center within. Hence my necessity to add a wrapping container div and then have it close again after the dropdown ul tag is closed.
Hope you understand.
Well I figured out a temporary fix.
Somehow the variable $id was not corresponding with the $post_id when the function get_the_ID(); from post-template.php was called to assign a comment to a post. $id was being assigned to the attachment and not the post the attachment was on.
I have now changed wp-includes>comment-template.php in the function comment_form(); (line: 1510)
>>>>from
if ( null === $post_id )
$post_id = $id;
else
$id = $post_id;>>>>into
if ( null === $post_id )
$post_id = $post_id;
else
$id = $post_id;It works now but I still don’t know why the id is being overridden by the featured image. If anybody every figures out why please let me know.
Yes it’s screwy and I don’t know why.
Yes if you click reply(beantwoorden) on 1 of the comments then it does have the correct ID. Something is making the attachment(featured image) give the default value with regular posting of comments.
1 of the last lines of code in the themes comments.php is
comment_form( $defaults ); ?>
so I assume this is the case.Like I stated in the original post. Support from the theme developer is a bit slow so I thought I would try here to speed up the process.
Anyways thanks for having a look.
The code I posted above is from the post https://www.bekendeburen.nl/?p=441 which has https://www.bekendeburen.nl/?attachment_id=420 as a featured image.
Thanks for your reply.
I tried switching to another theme and the problem wasn’t there.
I located the problem.
<p class=”form-submit”>
<input name=”submit” type=”submit” id=”submit” value=”Plaats Reactie” />
<input type=’hidden’ name=’comment_post_ID’ value=’420′ id=’comment_post_ID’ />
<input type=’hidden’ name=’comment_parent’ id=’comment_parent’ value=’0′ />
</p>This piece of code attached to the comment submit button is getting the wrong value. In this case the 420 is the featured image and not the post. With Chrome browser developer mode I manually changed the value to match the post and the comment was correctly attached.
So….. where do I locate this code and how do I change it?