So what are lines 40-50 of that file?
function aasaan_applicant()
{
$content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;">
<a>"></a>
</div>';
return $content;
}
add_shortcode('aasaan_applicant','aasaan_applicant');
* Applicant ID= */
function aasaan_applicant()
{
$content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;">
<a href="<?php echo get_theme_file_uri( '/register/applicant_functions/registration.php' ); ?>"></a>
</div>';
return $content;
}
add_shortcode('aasaan_applicant','aasaan_applicant');
//this is the code of that error
You’re dropping a <?php construct into a string. Break it up and use the string append operator to put things together.
Something like
$content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;"><a href="'
. <?php echo get_theme_file_uri('/register/applicant_functions/registration.php' ); ?> .
'"></a></div>';
Parse error: syntax error, unexpected ‘<‘ in C:\wamp64\www\wordpress\wp-content\plugins\myplugin\applicant_functions\functions.php on line 47
again send an error
function aasaan_applicant()
{
/* $content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;"><a href="'.<?php echo get_theme_file_uri('/applicant_functions/registration.php' ); ?> .'"></a></div>';
return $content;
}
add_shortcode('aasaan_applicant','aasaan_applicant');
sir I am going to develop a plugin and me directory path is this
C:\wamp64\www\wordpress\wp-content\plugins\myplugin\applicant_functions
my files are
auth_session.php
login.php
db.php
registration.php
logout.php
start.php
dasboard.php
now i want to access my registration.php file in start.php file kindly tell me how i can access the above code show me the error
function aasaan_applicant()
{
<strong>the below line is 47</strong>
$content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;"><a href="'.<?php echo get_theme_file_uri('/applicant_functions/registration.php' ); ?> .'"></a></div>';
return $content;
}
add_shortcode('aasaan_applicant','aasaan_applicant');
-
This reply was modified 4 years, 10 months ago by
rizwanramzan.
I think you need to read the developer documentation.
$content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;"><a href="';
#content .= get_theme_file_uri('/applicant_functions/registration.php' );
$content .= '"></a></div>';
Note that you should not use echo statements inside a shortcode.