Comments (3)
I don't see how making the query a globally accessible variable would affect the query results. Do you have any code that is modifying display posts or the $dps_listing variable that might be conflicting with it?
Do you happen to have a staging site available? I'd love to hop in and debug the issue on your site without affecting your live website.
from display-posts-shortcode.
I don't see how making the query a globally accessible variable would affect the query results. Do you have any code that is modifying display posts or the $dps_listing variable that might be conflicting with it?
That's weird for me to.
I have not found any references to $dps_listing, I have tried even renaming it
but it does not change behavior.
Do you happen to have a staging site available? I'd love to hop in and debug the issue on your site without affecting your live website.
What kind of access would you need, shell access to the OS?(because it might be problematic :/)
Can you give me some ideas where to start debuging, I suspect that it has to be problem with custom theme that site uses?
from display-posts-shortcode.
I'd start by looking at the query arguments to see what is passed to WP_Query. I'd add something like this to your hteme's functions.php file (don't add this to the live site because the debugging code will be visible to everyone):
add_filter( 'display_posts_shortcode_args', function( $args, $atts ) {
ea_pp( $args, 'Arguments' );
ea_pp( $atts, 'Attributes );
return $args;
}, 10, 2 );
/**
* Pretty Printing
*
* @since 1.0.0
* @author Chris Bratlien
* @param mixed $obj
* @param string $label
* @return null
*/
function ea_pp( $obj, $label = '' ) {
$data = json_encode( print_r( $obj,true ) );
?>
<style type="text/css">
#bsdLogger {
position: fixed;
top: 0;
right: 0px;
border-left: 4px solid #bbb;
padding: 6px;
background: white;
color: #444;
z-index: 999;
font-size: 1.25em;
width: 400px;
height: 100vh;
overflow: scroll;
}
.admin-bar #bsdLogger {
top: 32px;
height: calc( 100vh - 32px );
}
</style>
<script type="text/javascript">
var doStuff = function(){
var obj = <?php echo $data; ?>;
var logger = document.getElementById('bsdLogger');
if (!logger) {
logger = document.createElement('div');
logger.id = 'bsdLogger';
document.body.appendChild(logger);
}
////console.log(obj);
var pre = document.createElement('pre');
var h2 = document.createElement('h2');
pre.innerHTML = obj;
h2.innerHTML = '<?php echo addslashes($label); ?>';
logger.appendChild(h2);
logger.appendChild(pre);
};
window.addEventListener ("DOMContentLoaded", doStuff, false);
</script>
<?php
}
I'd then comment out the global variable and run that code again to see if there's any change to the query arguments.
from display-posts-shortcode.
Related Issues (20)
- Display Posts Date View - support for day and week view
- When using [display-posts taxonomy=...] twice on a page, only the first shortcode is rendered HOT 5
- Just display post count? HOT 2
- Extension: AJAX "read more" HOT 7
- [Extension Review] Display Posts Shortcode - AJAX Read More HOT 2
- Except `span` and dash is output even if no excerpt exists. HOT 2
- Multiple orderby parameters
- date_format="relative" is relative to UTC not site current time. HOT 1
- posts_per_page is hardcoded in plugin HOT 3
- Underscore in wrapper_class HOT 1
- Feature suggestion: add query parameter is_featured for Woocommerce featured products HOT 2
- What are the steps to add an extension ? HOT 2
- Optimizing the query even further HOT 1
- GPL 3.0
- post archiving HOT 4
- DPS not adding posts to $_genesis_displayed_ids in widget area HOT 2
- pagination not displayed when offset parameter is uset HOT 1
- [bug] Display Posts Date View - Default priority can cause filter to be overwritten
- Include "category__not_in"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from display-posts-shortcode.