Forum Replies Created

Viewing 15 replies - 1 through 15 (of 32 total)
  • Thread Starter johnda

    (@johnda)

    Hello Steve Stern,

    thanks for the reply. I see, my goal is to have all the media files under one page that someone can access through a page link in my homepage for example ”Gallery”. The idea is to have all images under one page that people can access and see.

    Thanks

    John

    Thread Starter johnda

    (@johnda)

    Hi Jan

    thanks for the reply.Unfortunately they don’t provide coding solutions and I have no idea how to do it myself. So where to ask for help ?

    Thread Starter johnda

    (@johnda)

    Hi bcworkz,

    Yes I wrote Artist because that was the user role but in user role plugin for the second name I gave just artist and I didn’t know I shall give the second option . In wordpress it is Artist but in user role plugin I gave Artist and artist, as the second id therefore it functions with the second name , anyway ,now it works.

    Thanks a lot

    John

    • This reply was modified 3 years, 8 months ago by johnda. Reason: edit it worked
    Thread Starter johnda

    (@johnda)

    Hi again, Sarah.

    Yea I know these plugins and went through them. Unfortunately these only offer the function to restrict the whole uploading action which is not what I am looking for. I am looking to restrict the ”Artist” user role I have already created, to upload only one pictures to his media gallery.

    It is rather a bit of an adjustment inside the whole uploading function therefore I doubt there is a plugin for that.

    Thanks

    John

    Thread Starter johnda

    (@johnda)

    Hi Sarah,

    thanks for the reply. I have done the first step already I have the user role created called ”Artist”.

    What I need is to limit the file upload for this user role I have created, to 1 image only for which I cannot find a plugin nor a working code so far.

    Thanks

    John

    Thread Starter johnda

    (@johnda)

    Ciao Erik,

    Ok sure will do

    I see you are italian , you must surely know how to make the button text italic [regular not bold] ;D

    I tried < em > and < i > in the contact form settings but no change.

    any idea/

    Thanks

    update; found it

    .wpcf7 .wpcf7-submit {
    font-style: italic;
    }

    John

    • This reply was modified 3 years, 8 months ago by johnda.
    • This reply was modified 3 years, 8 months ago by johnda.
    Thread Starter johnda

    (@johnda)

    I managed to fix all the troubles by just deleting the previous code from functions.php this one =

    function remove_contact_scripts() {     
        
        /* remove Contact Form scripts if not viewing Contact page */
        if ( !is_page( array( 'contact' ) ) ){
            wp_dequeue_script( 'contact-form-7' );
            wp_dequeue_style( 'contact-form-7' );
    
          
        }
    } 
    add_action('wp_enqueue_scripts', 'remove_contact_scripts', 99);

    and follow https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/. I gave up on that article at first because I could not understand that I had to put the code before wp_head() in my contact.php because there was no wp_head(). What I have is get_header(); . Now I tried to just put it before get_header(); and its done. Now I can go and customize with .wpcf7
    {
    margin-top: -3%;
    }
    And all form pages look the same.

    Solved.
    Thanks Erik for all the ideas/suggestions and code learning you gave me.

    John

    Thread Starter johnda

    (@johnda)

    When I am deloading the script and style from the php function for the contact page it then also adds margin and duplication – colorless field required message to the contact form. Then I tried to give the function to the test custom template page ,the same contact form and the margin , the colorless field require messages and the duplications are still there. Then I go back and put the
    ( ‘contact’ ) inside the function again and it brings the form back to without margin colorless errors and duplications. I inspected both sites and the margin for the site area and the container area is the same at 0 . What brings the form in the testpage to the same spot as the contact page is when I uncheck the –global-md-spacing: 2rem; in root global.min.css but that also pushes the submit button close to the textarea where before there was margin between textarea and button and also the other problems persist. So there must be for the custom contact page form some style loading it different from the custom test page form. But both forms are the same form just inserted in different custom template pages.

    p.s I am now trying to do every css edit from my style.css of the child theme after I activated ”add_action( ‘wp_enqueue_scripts’, ‘child_enqueue_styles’ );” in my functions.php of the child-theme, to have everything in one place.

    Thread Starter johnda

    (@johnda)

    Hey Erik,

    Important did it ! Super.

    Now I am set with this contact form .
    Though new problems arise when I go any use this form in another page. It duplicates the messages and shows them in a list , it shows the The field is required. next to the container instead of below , and it is not red color like normal. The same form id in another page. [ at least the button is correct ;D ]
    [I also tried to create a new form altogether but the same is happening as copying the existing one.]

    Any ideas why this is happening/ A day ago I somehow made it to show the message only 1 time in the bottom of the form when It was sended. Now the duplication is back and also in list format and colors are missing. Strange as the contact page form which is the same as the new page same form is functioning different.
    https://ibb.co/album/qLxDgw
    images of ”main form I am working on past days” and ”same form different page”

    Also the contact form eventhough the 2 different pages are both set to ”unboxed” ”narrow” etc , have the same page settings, has a bigger margin from the top of a couple of pixels in IDLE state without any messages changing its spot. As if in the other pages the margin is bigger from the top but there are no settings for margin in a shortcode therefore also strange happening.

    Thanks

    John

    Thread Starter johnda

    (@johnda)

    Hey Erik , thanks for contacting back.

    Yes thats the mission I guess ;] . Look what comes with the ready download of kadence child-theme from their website;

    /**
     * Enqueue child styles.
     */
    function child_enqueue_styles() {
    	wp_enqueue_style( 'child-theme', get_stylesheet_directory_uri() . '/style.css', array(), 100 );
    }
    
    // add_action( 'wp_enqueue_scripts', 'child_enqueue_styles' ); // Remove the // from the beginning of this line if you want the child theme style.css file to load on the front end of your site.
    
    /**
     * Add custom functions here
     */

    I suppose for me to edit the styles.css of my child-theme , I would have to follow the instruction and remove the // before add-action , which is what you are telling me so long right/

    So just to clarify about the button. The hover state works perfectly fine on idle, the idle backround is also super. The moment I click ”send” button , the button changes its color to blue instead of my custom color. The border which is also custom stays the same but the backround-color changes as soon as I hit send. Then if I click one time on the website interface , its goes back to my custom color. I also tried the focus parameter , what happend is that this time it didn’t change to blue but actually stayed on ”hover state” until I click again on the website interface for it to go back to the idle backround custom color.

    Thread Starter johnda

    (@johnda)

    Hi Erik,

    Yes , I was also confused with all these same names in different folders.
    What I have done so far is to first copy every folder from the parent theme into the child theme.

    After that I actually have also create a template contact.php page from a page.php copy into the child theme. Then in the child theme functions.php I have added a different code from the ones suggested in offical cf7 website for the css and js loading:

     function remove_contact_scripts() {     
        
        /* remove Contact Form scripts if not viewing Contact page */
        if ( !is_page( array( 'contact' ) ) ){
            wp_dequeue_script( 'contact-form-7' );
            wp_dequeue_style( 'contact-form-7' );
    
          
        }
    } 
    add_action('wp_enqueue_scripts', 'remove_contact_scripts', 99);

    so there is no need for the wp-config.php edit as it works on inspect while I did not before, it would either load everywhere or load nowhere depending on if I had define( ‘WPCF7_LOAD_JS’, false ); or not but now with the code above it loads scripts only in the contact page.

    All the styles I am editing is done in the ”Customize” area of wordpress , for the kadence child theme in Additional CSS [the child theme was downloaded from kadence direct so it had the styles.css and functions.php already configured]. So all the code edits I have done so far are: in contact.php [copy of page.php] for the template recognition , the function.php of child-theme for the loading of js and css, the Additional CSS area for the button colors, width of textarea and colors .wpcf7 form.sent .wpcf7-response-output.

    I have tried the .wpcf7 .wpcf7-submit:active addition but unfortunately the send button still changes color when clicking it and sending the message.

    Thanks

    John

    Thread Starter johnda

    (@johnda)

    Ciao Erik,
    I skipped all that and just went to Additional CSS in my customize theme section in wordpress and added

    .wpcf7 textarea {
    width: 50% !important;
    }
    .wpcf7 .wpcf7-submit {
      /* the send button style */
    	border: 1px solid #243B53;
    	    border-radius: 0px;
    	    background-color: rgba(36, 59, 83, 1);
    }
    
    .wpcf7 .wpcf7-submit:hover {
      /* the send hover button style */ 	
        border: 1px solid #243B53;
    	color:
    		rgba(36, 59, 83, 1);
    	background-color: rgba(255, 255, 255, 1);

    Now the width has changed like I wanted it and also the button is right. [Not sure why I couldn’t do it before in Additional CSS but I am happy it works now.

    The only problem that is now new is that when I click the Send/submit button,
    the color of the backround will change to the original , keeping the boarder custom like I set it and also the text to white as I set it. Only the backround pops back to the original or blue for that matter.
    Here are some pictures of before , after , and the actual code I am using atm https://ibb.co/album/HCJYYx
    .
    I will want to stay #243B53 or rgba(36, 59, 83, 1) as the idle state and not change after submitting , tried to change the

    .wpcf7 form .wpcf7-response-output {
    margin: 2em 0.5em 1em
    padding: 0.2em 1em;
    border: 2px solid #00a0d2; /* Blue */
    }

    to my color as it was the only section in cf7 plugin include folder css that had ”blue” in it but that did no change.

    Any ideas?

    Thanks

    • This reply was modified 3 years, 9 months ago by johnda.
    Thread Starter johnda

    (@johnda)

    Hi Erik,

    thank you for taking time to answer my questions and sharing your knowledge with me.
    I am actually aware of the overriding of the parent theme incase of an update therefore I will always now edit the child theme and import the specific folder / file I want to edit.

    Please if you are so kind , could you lay down the steps again for me.
    Is it like this:
    1. Copy the assets folder of parent theme into the child theme.
    2. create css file with name cf7.css
    3. copy paste the contact-form-7/includes/css/styles.css code you sent above
    4. Where do I add the function after that? In the same cf7.css in the end ?
    5. Also , wouldn’t it be the same or simple to just copy paste the actual ”contact-form-7/includes/css/styles.css” from the parent theme direct to the child instead of the assets folder and the cf7.css creation?
    6. Which code from the style is for the submit button text/backround/hover/border colors?
    7. Which code from the style is for the textarea width?

    Thanks

    Thread Starter johnda

    (@johnda)

    Hi Erik,

    I am in the cPanel at the moment and going through all the folders etc in my parent theme [as the child theme is only consisting of the functions.php , styles.css and a screenshot. I guess I have to copy paste whatever I want from the parent theme right?] and what I found was these areas: First I went to plugins and found the cf7 plugin. In there the only styles.css I can find is in the admin folder and in the includes folder. These are slightly different or same in some points perhaps, style.css files. The Includes folder of the plugin style.css is similar to the code you suggest I paste into child-theme-name/assets/styles/cf7.css [ in my parent theme /assets/ there is css folder , not a styles one , please clarify this is the same one and in there, there is no cf7.css file or anything similar neither in the next folders of ”editor and src”. Thats all for the 2nd option you wrote. Now for the first option , about custom css in my theme folders style.css, there isn’t any trace of cf7 there , just the green text of information about kadence theme , so I am confused as to how to
    ”Remove
    if ( function_exists( ‘wpcf7_enqueue_styles’ ) ) {wpcf7_enqueue_styles();}” as this is not available already.

    I also read all these codes in the plugins folders 2 style.csses [in includes and admin folders] and there is no mentioning of ”max-width:inherit nor .wpcf7-form-control-wrap.your-message ” . The one thing I found that I hoped would change the width size of the textarea was in admin style.css:

    ”.tag-generator-panel .control-box textarea.values {
    width: 200px;
    height: 6em;
    } ”

    I tried to reduce the px of for width but that didn’t do anything.

    I would be happy by just changing the width size area [as the height was changed by x1 in between the label in the contact form edit settings itself] and the button backround/border/text colors on idle and hover states.

    As for the multiple files function , I though of restriction the access to only users for this specific function form of uploading files, therefore I am thinking spam will be also restricted?

    Thanks

    John

    Thread Starter johnda

    (@johnda)

    Ciao Erik,

    I was tired yesterday and didn’t quite understand your point to use smtp. I went ahead and configured an smtp server and now everything works fine.

    Thanks again.

    John

Viewing 15 replies - 1 through 15 (of 32 total)