[Resolved] Little php error problem

Home Forums Support [Resolved] Little php error problem

Home Forums Support Little php error problem

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #490264
    Michal

    hello,

    I want to have custom content between comments. Something like this:
    ( https://wordpress.stackexchange.com/questions/251219/additional-content-every-x-comments )

    I am trying to incorporate this functionality into generatepress theme but from an hour I can’t find my mistake

    I created a custom plugin, created 3 custom fields named 1,2,3 and then replaced

    wp_list_comments( array( 
    	'callback' => 'generate_comment'
    ) );

    with

    wp_list_comments( array( 
    	'callback' => 'generate_comment'
    	'_inject_content' => [ get_field('1'), get_field('2'), get_field('3') ]
    ) );

    What’s wrong with my php code?

    I added this code (which should show content between comments but then all comment section disapeared)

    Thanks for any suggestions.

    #490960
    Tom
    Lead Developer
    Lead Developer

    As long as get_field('1') are pointing to correct fields, I don’t see anything wrong with your PHP.

    I don’t have a lot of experience with this specific functionality though, so I’m sorry that I’m not very helpful!

    #491152
    Michal

    no problem;)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.