Need a little php help (7 posts)

  1. Saurus
    Posted 7 years ago #

    Another poster asked last week if it was possible to substitute a graphic image for the "read more" text using the excerpts or <--more--> button in the editor. Thinking that was a nice touch i made up a nice little button in Xara Webstyle and tried to get this to work. I first tried adding it to the styles in the #contentmiddle a .more-link selector using the "url (/images/.." code. No good there. Next tried the page.php file where the more link appears (actually, I later found it appears in 3 different php files) Again - no success, in that the image appears, but the "read more" text is superimposed over it. Rats! The image name is continue.png. I had previously edited the style of the read more tag, so I'm not completely incompetent there, but this one has me baffled.

    Can any php magicians conjur up a way for this to work? PHP is way out of my comfort level at this point in my life:(

    Gads - forgot a link: <url>http://brucesplace.net/wordpress</url>

  2. Saurus
    Posted 7 years ago #

    This is strange - my post disappeared and all I see is the Reply text box!

    Well let's try this again ...

    Last week, another poster inquired if it was possible to use an image rather than a text link for the <--more--> button of the excerpt tag. I don't bel;ieve it received any feedback. I was intrigued by this and thought I'd experiment, so I made a nice little graphical button in Xaea Webstyle and sent it to my themes images folder.

    First try at implementing was the stylesheet, specifically the #contentmiddle a.more-link container, adding url (/images/continue.png). Fail.

    Second attempt was scanning the various php files to find a reference to the "read more" tag. There were 3 - index.php, page.php, and functions.php. I decided to try the page.php and added the path to the graphic to the link reference.

    That worked partially - the graphic i made appeared, but the regular read more text (which I had already edited the style of) was superimposed over it. Not good. I am now stumped how to get this to work correctly. Since at my age of the game attempting to learn any more of php than I do - which isn't much - I need a hand from someone much more capable with the language to pull this off. Assuming, of course, that the page.php is indeed where this should go.

    Anyone? Beuhler?
    Site link: <url>http://brucesplace.net/wordpress</url>

  3. Samuel B

    Posted 7 years ago #

    sorry saurus - akismet got you twice - you are now freed

  4. Saurus
    Posted 7 years ago #

    I've been spammed!!! Oh the horror:)

    Strange all those other posts got through and that didn't. Oh well! Now to wait and see if someone can come up with a solution:)

  5. Saurus
    Posted 7 years ago #

    Anyone have any suggestions on this?

  6. Samuel B

    Posted 7 years ago #

    I suppose you read this?

    sorry not much good at what you are doing

  7. Saurus
    Posted 7 years ago #

    Yeah, I did, Sam. Problem with the first example is it only adds an image after the text rather than replacing it - which is wjhat I was after.

    The second example is one I found by accident - using the image as a background with the read more superimposed over it. Again, it doesn't remove the read more text instead of replacing everything with an image:( It would seem there should be a way to replace the text with an image, but I've been unsuccessful in all attempts so far.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.