page displaying link widget instead of text

  • Unknown's avatar

    Please help, experienced WordPressers! I have been setting up new image widgets as links to pages on my wordpress site. The widgets are displaying fine, but the link only works for the top one of three widgets – the other two link to a non-existant page with the same domain name as the desired page, but none of the text, only a full size image of the link widget. As far as I can tell, I set all three up the same way.
    When I then view the pages in question via the “Edit Page” screen, the page text is still there, but when I click “view page” I am again taken to the image only, not the text I have entered into the “Edit Page” screen.
    I hope this makes sense, please look at http://backyard-revolution.net and click each of the three widgets on the right, you’ll soon see what I mean
    any ideas?
    much thanks

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    That’s happening because the slugs of the child pages are identical to the names of the image files.

    When you turn a page into a child to another page, its URL becomes:
    http://BLOGNAME.wordpress.com/PAGESLUG/CHILDPAGESLUG/

    When you upload an image via the Add Media button of a page, you get several link options. One of them is the so-called “attachment page”: a blog-like page with the image on it. The URL of an attachment page is:
    http://BLOGNAME.wordpress.com/PAGESLUG/IMAGENAME/

    As you can see, if CHILDPAGESLUG = IMAGENAME, you get identical URLs, and the childpage gets mixed up with the attachment page.

    Solution 1: Remove the spaces from the names of the image files (the ones stored in your hard disk), upload them via Media > Add New, copy the URLs you’ll get, use those new image URLs in the widgets.

    Solution 2: Go to Pages > All Pages, hover over each title, click Quick Edit, change slug (for example, turn “on-ground-action” to “on-ground-action-page”), click Update, use those new page URLs in the widgets.

    Solution 3: Go to Pages > All Pages, hover over each title, click Quick Edit, select “Main Page (no parent)” from the parent pulldown, click Update, use those new page URLs in the widgets.

  • Unknown's avatar

    Thank you very much for this quick reply and simple solution. I used the second suggestion, just changing “slugs” (a new term for me!!) and it worked fine
    I still don’t understand why it happened to only two of the three pages in question, but I now get the general idea about giving page “slugs” a different name from images.
    cheers!

  • Unknown's avatar

    You’re welcome!

  • The topic ‘page displaying link widget instead of text’ is closed to new replies.