Forum Replies Created
Viewing 4 posts - 1 through 4 (of 4 total)
-
Author
-
bingoenvatoParticipant
Strange behaviour:
This disabled Lightbox on certain CPT (product, bullishow) too.
COPY CODEadd_action( 'wp_print_scripts', 'vanagogo_javascript', 100 ); function vanagogo_javascript() { if ( ! is_singular( array('page', 'attachment', 'post') ) ) { wp_deregister_script( 'gmw-js' ); } }
This solves the issue:
COPY CODEadd_action( 'wp_print_scripts', 'vanagogo_javascript', 100 ); function vanagogo_javascript() { if ( ! is_singular( array('page', 'attachment', 'post', 'product', 'bullishow') ) ) { wp_deregister_script( 'gmw-js' ); } }
bingoenvatoParticipantHi Radu,
thank you for the hint, but unfortunately this does not work, but I found this
COPY CODEadd_action( 'wp_print_scripts', 'vanagogo_javascript', 100 ); function vanagogo_javascript() { if ( ! is_singular( array('page', 'attachment', 'post') ) ) { wp_deregister_script( 'gmw-js' ); } }
So far GeoMyWP CSS in Geodirectory is right.
Perhaps you have a more elegant solution to this.
bingoenvatoParticipantHi Radu,
tried this:
COPY CODEadd_action( 'wp_print_scripts', 'vanagogo_javascript', 100 ); function vanagogo_javascript() { if ( is_page_template( 'geodir-listing.php' ) ) { wp_deregister_script( 'gmw-js' ); } }
and this:
COPY CODEadd_action( 'wp_print_scripts', 'vanagogo_javascript', 100 ); function vanagogo_javascript() { if ( is_page( 1 ) ) { wp_deregister_script( 'gmw-js' ); } }
The second one with page ID works, but the listings called with an Geo Directory-archive template ( 1. snippet above ) does not work.
But this is, what I need. Do you have any further suggestion?
bingoenvatoParticipantTry to add this
COPY CODEfunction dequeue_my_css() { wp_dequeue_style('gmw-style-css'); wp_deregister_style('gmw-style-css'); } add_action('wp_enqueue_scripts','dequeue_my_css');
to disable GeoMyWP-CSS, but does not work. Seems there are two CSS files loaded from the GEoMy WP-PlugIn:
COPY CODE<link rel="stylesheet" id="gmw-style-css" href="https://vanagogo.de/wp-content/plugins/geo-my-wp/assets/css/style.css" type="text/css" media="all"> <link rel="stylesheet" id="gmw-cl-style-dep-css" href="https://vanagogo.de/wp-content/plugins/geo-my-wp/assets/css/gmw-cl-style-dep.css" type="text/css" media="all">
So, I just need to disable this for the listing templates of Geo Directory to solves.
Can you help me on this?
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)