• I am trying to link a text inside a sidebar to a separate page.
    Here is the code:

    “;
    }

    The list is displayed fine without a link inside, but with link I get this error message:

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’

    What is wrong here?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator James Huff

    (@macmanx)

    Can you paste the actual code in the pastebin? What you’ve provided here really doesn’t help.

    Thread Starter sasa2209

    (@sasa2209)

    I have pasted it

    Moderator James Huff

    (@macmanx)

    I think it’s either the relative URL or the characters at the end causing it. Try just this (obviously edit the URL as necessary):

    <ul>
    <li>Contact us:</li>
    <li>tel: +44(0)203 2397692</li>
    <li>tel: +385(0)42 729 191</li>
    <li>mob: +44(0)7989 194003 </li>
    <li>email: [email protected]</li>
    <li><a href="https://www.yourdomain.com/guest-book/">Guest Book</a></li>
    </ul>
    Thread Starter sasa2209

    (@sasa2209)

    Still it is showing syntax error. Here is the complete sidebar code.
    The thing I am trying to do is to show sometnig in a sidebar, but to exclude it on a another page when sidebar shows.

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    ?>
    	<div id="sidebar" style="text-align:center;">
    
    <?php if (is_page('Home')) { echo "
    <h3 style=\"text-align:center;\">Minty’s News</h3>
    		    <table style=\"width: 100%; text-align:left;\">
    				<tr>
    					<td style=\"text-align:left\">Wine</td>
    					<td>&nbsp;</td>
    					<td  style=\"text-align:right\">€35 </td>
    				</tr>
    				<tr>
    					<td>Canoeing</td>
    					<td>&nbsp;</td>
    					<td style=\"text-align:right\">from €35  </td>
    				</tr>
    				<tr>
    					<td>Hiking</td>
    					<td>&nbsp;</td>
    					<td style=\"text-align:right\">€25 </td>
    				</tr>
    				<tr>
    					<td>Horse trekking </td>
    					<td>&nbsp;</td>
    					<td style=\"text-align:right\">from €50 </td>
    				</tr>
    				<tr>
    					<td></td>
    
    				</tr>
    			</table>
    			<br />
    
    <ul>
    <li>Contact us:</li>
    <li>tel: +44(0)203 2397692</li>
    <li>tel: +385(0)42 729 191</li>
    <li>mob: +44(0)7989 194003 </li>
    <li>email: [email protected]</li>
    <li><a href="https://www.mintyschoice.com/guest-book/">Guest Book</a></li>
    </ul>";
    }
    
    else if (is_page('offers')) { echo"
    <iframe style=\"padding-top:10px;\" width=\"245\" height=\"245\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"https://maps.google.com/maps/ms?ie=UTF8&hl=en&oe=UTF8&msa=0&msid=107457885445854407904.000477c1b9a32c3245774&ll=45.328979,15.79834&spn=2.317136,3.295898&z=7&output=embed\" style=\"border:solid 3px #4CAB00;\"></iframe><br /><small>View <a href=\"https://maps.google.com/maps/ms?ie=UTF8&hl=en&oe=UTF8&msa=0&msid=107457885445854407904.000477c1b9a32c3245774&ll=45.328979,15.79834&spn=2.317136,3.295898&z=7&source=embed\" style=\"color:#0000FF;text-align:left\">Minty's Choice</a> in a larger map</small>";  }  ?>
    
    </div>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Link problems’ is closed to new replies.