Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

First attempt at using php for wordpress.

Featured Replies

I'm following a tutorial for custom coding a wordpress theme.

 

The current part I am on is where you place a cursor over a post title link and a description pops up.

 

Code is

<h2><a href=”<?php the_permalink(); ?>“ title=”<?php the_title(); ?>”> <?php the_title(); ?></a></h2>

 

Have I made a mistake? because only the first word of the title pops up instead of the whole title.

Cheers.......

A very razzed off Helen. <_<

We would need a lot more to work with than just that to figure out what your error is!

 

Check the HTML source and see if the title is only the first word there, or if the whole phrase is there.

 

If its the former, then its a php error, latter, an html/browser error.

In your description you probobally have quotations, view the source of your page and check to see what all is in your a tag.

 

 

Try this, it will probobally add slashes to every quotation though.

<h2><a href="<?php the_permalink(); ?>" title="<?=addslashes(the_title(); ?>"> <?php the_title(); ?></a></h2>

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.