Home Forums Plugin Support WP User Frontend Pro Hide fields on the frontpage

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Tareq Hasan 5 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6777

    selenus
    Participant
    Post count: 14

    Hi Mahi,

    We need to hide some fields in the products tab on our website. We've used this function to hide the gallery and worked perfectly:

    < ?php ob_start(); the_content('Read the full post',true); $postOutput = preg_replace('/]+./',”, ob_get_contents());
    ob_end_clean();
    echo $postOutput;
    ?>

    But now we need to hide a full field, something like the plugin does to uncheck “Show attachments in the post”. But instead it hide everything, only the field that we want (two or three specific fields that are created with Front End Pro).

    Best regards!!!

    #6865

    Tareq Hasan
    Keymaster
    Post count: 2831

    Using preg_replace, you are searching in the post content and replacing it. Instead of doing that, you could remove the gallery from your theme.

    Anyway, the unchecking option in the plugin uses JavaScript to show/hide elements based on CSS class/ID. Not sure if it'll work in your case.

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

The topic ‘Hide fields on the frontpage’ is closed to new replies.