Group Admins

  • Profile picture of Steve

WordPress Troubleshooting and Support

Public Group active 1 month, 3 weeks ago ago

WordPress support from our community

Crazy tags

This topic contains 0 replies, has 2 voices, and was last updated by  Chad 7 years, 4 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1298

    Chad
    Participant

    Lately I have done a lot of Custom Theme for the company i work for and seem to have a problem with Extra paragraph

    tags showing above and below my the_excerpt(); once render in the browser. See code example below:

    *** note: List items a in a the loop ***

    In template file:

  • < ?php if (get_post_meta($post->ID,’product_icon’, true)) { ?>
    “>< ?php the_title(); ?>

    < ?php the_excerpt(); ?>

  • Displaying in browser:

  • Allow multi-lingual buy…ages from your website.

#2234

Chad
Participant

Sorry that didn’t work out – I will take screenshots

#2235

Chad
Participant

Here are the screenshots of my code

Template file: http://flic.kr/p/aBvVAx

Browser Rending: http://flic.kr/p/aByA1A

#2236

Steve
Keymaster

Does this happen on EVERY post, or just certain ones?

#2237

Chad
Participant

Every place that i have a the_excerpt(); function on page or post.

#2238

Steve
Keymaster
#2239

Chad
Participant

No luck using that method… But

I just found this on the codex http://codex.wordpress.org/Function_Reference/wpautop

Place remove_filter(‘the_excerpt’, ‘wpautop’); in the functions file (this remove the unwanted paragraph tags)

Then wrap the_excerpt(); with p tags ( to place the excerpt into a paragraph tag)

This seems to work..

Thanks for your help

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.