Stylesheet not queued on do_shortcode()
-
Hi Roland,
If I have a pdb list page which is invoked using a shortcode such as:
[pdb_list search="true" sort="true" suppress=true search_fields="artist,title"]and I do a search which yeilds multiple pages of results the pagination looks fine. It looks like this:
However, if I invoke the exact same shortcode using do_shortcode() i.e:
return do_shortcode ('[pdb_list search="true" sort="true" suppress=true search_fields="artist,title"]');
and I do the same search the pagination will not display properly. It will look like this:In seeing why this happens it is apparent that the stylesheet does not get queued properly in the second case. If I force the stylesheet to be enqueued:
wp_enqueue_style( 'pdb-frontend' );then the proper pagination is shown.
I’m not sure if this is a WordPress issue, or a plugin issue or something I’ve done or something else. Any idea on why the stylesheet has to be enqueued in code?
Thanks again!
The topic ‘Stylesheet not queued on do_shortcode()’ is closed to new replies.