New Landing How can we help? Cardinal Left Sidebar on previous posts

Viewing 11 posts - 1 through 11 (of 11 total)
  • Posted in: Cardinal
  • #215314
    obviews
    Member
    Post count: 19

    Hello,

    I need to change sidebar parameters to “Left” + “Sidebar 2” for more than 1000 posts. How can we do it directly in the database ?
    I saw parameters sf_sidebar_config and sf_left_sidebar in the table postmeta, but do I have to add or create other paramaters related to the post_id ?

    Thank you by advance,
    best regards.

    #215335
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    That would be stored for each post if set. You need to use a PHPMyAdmin DB search and replace query for each post, with the post meta and update the option.

    I would recommend you maybe look into simply changing the single post sidebar template within a child theme, doing search and replaces on databases is not a good idea if you are not comfortable using MySQL, you can seriously corrected the site.

    Thanks,
    David.

    #215715
    obviews
    Member
    Post count: 19

    Hi David,

    thank you for the fast reply. I’ll try to work on Cardinal Child Theme, furthermore the client needs other specific changments on the sidebar.

    Best regards,
    Suzanne.

    #215722
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Suzanne,

    That sounds like the safer option.

    – David.

    #216653
    Oluwarufus
    Member
    Post count: 22

    Do you mind providing a sample code for the child theme’s single post script?

    Thanks

    #216753
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi @Oluwarufus,

    If you want to change the single post page in the child theme, you just need to copy the single.php from the parent theme to the child theme and change it according to your needs.

    -Rui

    #217155
    obviews
    Member
    Post count: 19

    Hello everyone,

    here is a code I have added in /cardinal-child/header.php ~ line 38:

    $GLOBALS['sf_post_meta'][$post->ID]['sf_sidebar_config'][0] = 'right-sidebar';
    $GLOBALS['sf_post_meta'][$post->ID]['sf_left_sidebar'][0] = 'Sidebar-1';
    $GLOBALS['sf_post_meta'][$post->ID]['sf_right_sidebar'][0] = 'Sidebar-2';

    I hope it will be useful.

    Best regards.

    #217160
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Thanks for sharing.
    -Rui

    #217708
    Oluwarufus
    Member
    Post count: 22

    Thanks for sharing @obviews. Child theme is working but it’s messing up the layout though

    #217750
    Oluwarufus
    Member
    Post count: 22

    It’s working fine now….thanks

    #217760
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I am glad that your issue resolved.
    Thanks
    Mohammad

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register