Define link in wordpress

Step 1

Declare $more variable global on top of you custom WordPress page (I mostly declare it at the top of header.php) as shown below:

global $more;

Step 2

Now initialize $more to zero before calling the_content() function as shown below:

// — fetch latest News post — //

// fetch only 1 post from News category

query_posts( ‘showposts=1&category_name=news’ );

if( have_posts() ) {

while( have_posts() ) {

the_post();

$blog_title = get_the_title( get_the_ID() );

$more = 0; //this is required for Read More link to work on pages

$blog_content = get_the_content( ‘Read More…’ );

$blog_link = get_permalink();

} //end while

wp_reset_query();

} //end if