Ready to get started?Download WordPress


Digg Digg
[resolved] Attached to the_content (5 posts)

  1. elizabethannedesigns
    Posted 2 years ago #

    Noticed an oddity today - I have this displaying on posts only, which means it (correctly) displays on attachments. But ONLY if the attachment template calls the_content. So... this is attached to the_content? Is there a way to override this? Or a way to attach it to another element? The issue is that I'm actually calling the_content for the attachment template in a sidebar widget. So I have to a) call it in the template content section and do a display: none on the p class inside it, and b) the thing calls twice now, slowing down the site.

    Thoughts? Thanks


  2. elizabethannedesigns
    Posted 2 years ago #

    FYI - just tried putting the_excerpt into the post (still doing a display: none to just hide it), and adding adding this to functions.php to remove the extra call in the sidebar - no go. :(

    if(is_attachment()) {
    	remove_filter('the_content', 'dd_hook_wp_content');

    UPDATE! If anyone is searching for a solution to this, putting this function directly into my attachment template did the trick for the second call (still have to display none for the excerpt though):

    remove_filter('the_content', 'dd_hook_wp_content');

  3. lahoti
    Posted 2 years ago #

    i tried putting the_content() in display: non style but then my bar went into none.

    where exactly did you put none style..???

    i used like this and when i am seeing the code i have floating bar inside the none style


  4. elizabethannedesigns
    Posted 2 years ago #

    Hi lahoti - in my CSS I put the display none rule around the p tag embedded in the div around the content. But only for the attachment page. So your theme will need a different starting class for attachment pages (I already had this). Let me know if this made sense. Thanks!

  5. lahoti
    Posted 2 years ago #

    hmm not sure.. but i think I understood that until i change intial p tag for my content for post digg digg ownt work for me,..

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.