• Resolved Vorenus

    (@vorenus)


    I can’t place the custom code for the plugin in the admin panel because I use Sucuri wordpress plugin and I can’t edit directly the plugin.

    How to add custom css in the database directly?

    Thanks in advance!

    PS: I don’t know why when I updated the wp-paginate plugin to the latest version, my wp-paginate.css (placed in my theme plugin) was discarded Although I have the check enabled here:

    WP-Paginate CSS File:Include the default stylesheet wp-paginate.css? WP-Paginate will first look for wp-paginate.css in your theme directory (themes/ParentTheme).

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author AlanP57

    (@alanp57)

    CSS code added to Custom CSS tab of WP-Paginate is saved to wp-contents/wpp-custom-code/wpp-custom-code.css. Does the Sucuri plugin prevent you from saving custom CSS code?

    • This reply was modified 8 years, 1 month ago by AlanP57.
    Thread Starter Vorenus

    (@vorenus)

    Hello.

    I was researching the code and I found this:

    $upload_dir[‘basedir’] . ‘/wpp-custom-code/

    So, maybe you wanted say this path:

    wp-contents/uploads/wpp-custom-code/wpp-custom-code.css

    It seems like sucuri did not allow it to be created that path.

    I will to add that folder manually.
    What other files must be place in that folder?

    Regards

    Plugin Author AlanP57

    (@alanp57)

    The only other file is index.php which is empty but prevents anyone from viewing the contents of the folder.

    Thread Starter Vorenus

    (@vorenus)

    Thanks for your quick answers Alan.

    This neither worked.

    Yesterday I tried this 2 methods:

    * Add a wp-paginate.css file in your theme’s directory and place your custom CSS there
    * Add your custom CSS to your theme’s styles.css

    But they did not work. Why do you think is happening?

    Thanks in advance

    Plugin Author AlanP57

    (@alanp57)

    View the source code of the page containing the pagination and look for the link to the style sheet. And be sure that the Activate checkbox is checked on the Custom CSS tab. The link to the style sheet should look like this:

    <link rel='stylesheet' id='wpp-custom-style-css' href='https://example.com/paginate/wp-content/uploads/wpp-custom-code/wpp-custom-code.css?ver=4.7.1' type='text/css' media='all' />

    Thread Starter Vorenus

    (@vorenus)

    Ok. I will not do that. But yesterday I tried this 2 methods:

    * Add a wp-paginate.css file in your theme’s directory and place your custom CSS there
    * Add your custom CSS to your theme’s styles.css

    But they did not work. Why do you think is happening?

    Plugin Author AlanP57

    (@alanp57)

    The failure can be due to either the style sheet is not loaded or the CSS is overridden by other CSS from files loaded later in the sequence. CSS in file B will override CSS in file A if B is loaded after A. And CSS rules that are specifically targeted, such as ‘div.class-name1 a.class-name2’, will override those that are less specific, ‘div a’.

    Thread Starter Vorenus

    (@vorenus)

    Hello. Thanks. You said: “And be sure that the Activate checkbox is checked on the Custom CSS tab”…. do you know how to enable this in the database?

    Thanks in advance

    Plugin Author AlanP57

    (@alanp57)

    In the options table, the option_name would be ‘wpp_custom_css_active’, the option_value should be ‘on’ and autoload, ‘yes’.

    Thread Starter Vorenus

    (@vorenus)

    Thanks for your help Alan. You are the best Plugin Author!

    Plugin Author maxfoundry

    (@maxfoundry)

    Thanks Vorenus!

    Alan and I appreciate it.

    Ratings really help us a lot if you do not mind.

    Best,

    Bob and Alan

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to add custom css in the database directly?’ is closed to new replies.