Results 1 to 1 of 1

Thread: How can i redirect Attachment image to the coupon post

  1. #1
    Thread Starter
    Veteran mouradbouikni's Avatar
    Join Date
    Feb 2011
    Location
    France
    Posts
    368
    Thanks
    26
    Thanked 20 Times in 16 Posts

    How can i redirect Attachment image to the coupon post

    Hello every one.

    Can someone tell how we can redirect Attachment image to the coupon post.

    for example my site is http://code-shopping.fr/

    and I have a lot of attachment pages like : http://code-shopping.fr/?attachment_id=1138.

    the problem is they are poor pages without content, when search engine index them they will hurt SEO Ranking a lot.


    I have tried a lot of methods but no success :



    I replaced entire attachment page template with this code:

    PHP Code:
    <?php wp_redirect(get_permalink($post->post_parent)); ?>
    but the redirect doesn't work.



    I created an image.php with this code:

    PHP Code:
    <?php wp_redirect(get_permalink($post->post_parent)); ?>
    but also redirect doesn't work, get an error.


    I use a redirect plugin:

    but also don't work.....Can some one help.




    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    My Sites : Eden Deco Coupon and Darty Code

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to sorting coupon post by title name in coupon-category?
    By buddy110 in forum Help Using Clipper
    Replies: 2
    Last Post: October 27th, 2015, 05:48 AM
  2. Replies: 9
    Last Post: June 27th, 2013, 09:11 PM
  3. [MOD NEEDED] Set image attachment for pages
    By doctorcilantro in forum ClassiPress General Discussion
    Replies: 2
    Last Post: February 15th, 2011, 09:50 AM
  4. [SOLVED] Redirect failier to Post and Ad
    By cpena in forum Report ClassiPress Bugs
    Replies: 7
    Last Post: September 25th, 2010, 01:16 PM
  5. Missing Attachment Message so No Image Shows in Post
    By mnymaker in forum Report ClassiPress Bugs
    Replies: 10
    Last Post: July 19th, 2010, 08:55 PM