• Resolved wpprup

    (@wppraesenz)


    Hello,
    I have the same problem like others, regarding the centering of the pictures. My message under https://wordpress.org/support/topic/how-to-center-images-4/ was not answered, probably because the question was solved. So here again: 😉

    In the Divi text module, all settings are set on centering the related posts (in 1. module design text settings and 2. in the text itself: <p style=”text-align: center;”>[related-posts-thumbnails]</p> ), but it does not work. See for example https://praesenz-web.de/vom-ausbrennen-und-entfachen/

    Inserting the code from the mentioned support thread here into the functions.php produced a frontend error message:
    “Warning: Use of undefined constant ‘rpt_content_align’ – assumed ‘‘rpt_content_align’’ (this will throw an Error in a future version of PHP) in /www/htdocs/w018af01/praesenz-web.de/wp-content/themes/Divi-Child/functions.php on line 14

    Warning: Use of undefined constant ‘rpt_content_align_callback’ – assumed ‘‘rpt_content_align_callback’’ (this will throw an Error in a future version of PHP) in /www/htdocs/w018af01/praesenz-web.de/wp-content/themes/Divi-Child/functions.php on line 14”
    I am not a code specialist, sorry, and need help to center the images.
    Thank you very much.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Asad Shahbaz

    (@artisticasad)

    Hi there,

    Very sorry for the issue you are still facing.

    The code snippet I gave you earlier was right but the formatting of symbols was changed during copy and pasting code here.

    Please apply this code instead

    
    CODE STARTS HERE
    function rpt_content_align_callback( $class ) {
    $class = 'relpost-align-center';
    return $class;
    }
    add_filter( 'rpt_content_align', 'rpt_content_align_callback' );
    CODE ENDS HERE
    

    Hope all will work now.

    Thankyou for using our product. 😃 ✌

    Thread Starter wpprup

    (@wppraesenz)

    Hello Asad,
    thank you very much for the new code. Unfortunately just putting it into the custom css, the editor gives out five mistakes: three unexpected tokens and two expected ones…
    Saving though, it does not work either, sorry to say that. Unfortunately being no code expert, as said, I am not able to correct that.
    Thanks for another try… 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Centering images, again…’ is closed to new replies.