Is there a function for this? get_corresponding_id_for(111) -> 222
]]>Production email:
Please click on this verification link https://mysite.com/?page_id=3784?ur_token=tHqFNQVPjsnsvCMPyPyNgiGlA4DbJYi80nd5Rko4MxpMLEhDbGeXY0VUhtNU1LTEFFYUJsSGh0L3h0QT09 to confirm registration.
Workstation email:
https://mysite.com/my-account/?ur_token=1zsGilG1RA95bvMQoPuiP9uBQtgcAsyS9l1jzyp3vLlq7CaCPmTHRLM2Eza2g3ZHNYamdDYnBFc2NsQT09
The production link with page_id parameter was not working (did not set the verification of the user) while the workstation link with my-account parameter did.
After resetting owner to daemon:daemon recursively on the htdocs folder the production link also had the my-account parameter and was working.
So this issue has been resolved now.
For some reason the {{ur_login}} tag is not mentioned in the documentation at:
https://docs.wpeverest.com/docs/user-registration/email-settings/smart-tags/
I’m relatively new to WP, so forgive my indiscretions.
I have a library of information that I can list to a user. I have a custom php file that generates this, and I just display it in a page. When a user clicks on an element in the library, they get a detail of it. All the while, I have not left the page.
What I would like to do is provide the ability to have comments display uniquely for each element in the library. I dont want to create a unique page for everything in the library, since all the content is built on demand. It “seems” like I want to create a “page_id” based on what element I want, and then when I pull up the comments_template, it will retrieve it for that page_id. I just assume I can do something like this. Does anyone have a suggestion on the course I should pursue? Does this make sense? All of my research has been in vain to this point. Thanks,
Brian
]]>https://www.parcopiano.com/murgese/
this displays the german contents of the portfolio also there are two filter buttons to show the german catagories.
I have recreated this for the english pages with this link
https://www.parcopiano.com/en/murgese/
However the filters just do not work, the slug IDs look correct but I am completely lost.
I really need some help with this and would really appreciate any assistance. If I am posting in the wrong place just tell me and I will go elsewhere.
Many thanks
Graham
]]>**
* Validates whether this comment is allowed to be made.
*
* @since 2.0.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $commentdata Contains information on the comment
* @return mixed Signifies the approval status (0|1|'spam')
*/
function wp_allow_comment( $commentdata ) {
global $wpdb;
if(is_page(2999)){
} else {
// Simple duplicate check
// expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content)
$dupe = $wpdb->prepare(
"SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = %s AND comment_approved != 'trash' AND ( comment_author = %s ",
wp_unslash( $commentdata['comment_post_ID'] ),
wp_unslash( $commentdata['comment_parent'] ),
wp_unslash( $commentdata['comment_author'] )
);
if ( $commentdata['comment_author_email'] ) {
$dupe .= $wpdb->prepare(
"OR comment_author_email = %s ",
wp_unslash( $commentdata['comment_author_email'] )
);
}
$dupe .= $wpdb->prepare(
") AND comment_content = %s LIMIT 1",
wp_unslash( $commentdata['comment_content'] )
);
if ( $wpdb->get_var( $dupe ) ) {
/**
* Fires immediately after a duplicate comment is detected.
*
* @since 3.0.0
*
* @param array $commentdata Comment data.
*/
do_action( 'comment_duplicate_trigger', $commentdata );
if ( defined( 'DOING_AJAX' ) ) {
die( __('Duplicate comment detected; it looks as though you’ve already said that!') );
}
wp_die( __( 'Duplicate comment detected; it looks as though you’ve already said that!' ), 409 );
}
}
If its page id 2999 then duplicate is allowd else not.
Even if i change the if statement to the fallow it doesn’t work
/**
* Validates whether this comment is allowed to be made.
*
* @since 2.0.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $commentdata Contains information on the comment
* @return mixed Signifies the approval status (0|1|'spam')
*/
function wp_allow_comment( $commentdata ) {
global $wpdb;
$string = "home";
$container = $post->post_title;
if(strstr($container,$string)) {
} else {
]]>https://www.ads-software.com/plugins/theme-my-login/
]]>// Switch to Twenty Sixteen theme when we being on page_id.
Conditional_Themes_Manager::register( ‘twentyten’, function() {
$id = get_the_ID();
return ( $id== “153”);
} );
Other switches does work ,like
// Switch to Twenty Sixteen theme when we being on 2015.
Conditional_Themes_Manager::register( ‘twentyten’, function() {
return ( date( ‘Y’ ) == 2015 );
} );
But the switch based on the page id does not.
How can I get this to work properly?
I also tried with code like
global $wp_query;
$postID = $wp_query->post->ID;
return ( $postID == 153 );
but it does not seems to listen to me
https://www.ads-software.com/plugins/wp-conditional-themes/
]]>Can i get the page id in 404 page from where it is landed. So that i can show appropriate messages ?
for eg :
link 1 : xxx.com/need-this-slug-1/
link 2 : xxx.com/need-this-slug-2/
when it redirects to 404 error page, i need to show different error messages and give links to different sites.
So in 404 i need to know the parent url from where it got redirected.
Thanks in advance,
Prasad