joxyzan
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Prefill the comment textareaI’m back @bcworkz ??
Do you know how to avoid Parse error, unexpected token “echo” when I replace .get_the_author(). with .echo $fetchername->display_name. like this:
'comment_field' => '<textarea id="comment" name="comment" cols="45" rows="5" maxlength="65525" required="">'. __('Prewritten comment by ','textdomain').echo $fetchername->display_name.'</textarea>',
$fetchername is a userdata-array taken from a custom field and it works fine for echoing the display_name outside of this weird commentfield-thing i’m making…
Howdy!
I’ve had this message showing since updating to the latest version of the plugin: “Here is an error associated with Connecting WP REST API. Please Flushing rewrite rules by updating permalink in?Settings->Permalinks?and make sure the WP REST API is enabled.”
And I get the exact same line as @epss on /wp-json/wp-statistics/v2/hit?
Statistics seem to work except that I don’t get the usernames reported as I’m used to.
I’ve lurked around looking for answers to this without finding a clear answer or simple solution. It seems that a fix is needed from the plugin team?
Forum: Plugins
In reply to: [Ultimate Category Excluder] Posts unintentionally excluded in a WP_queryOkay!
The thing is though: even if I deactivate “Exclude from All Archives?” (or even deactivate your plugin) the functions.php-snippet I posted above makes category 3 disappear from my WP_Query. Isn’t that weird?
With your knowledge maybe you can tell me if my WP_Query has to be adjusted?
Forum: Plugins
In reply to: [Ultimate Category Excluder] Posts unintentionally excluded in a WP_queryThank you for answering Mario!
I would say profile/author pages do typically have post listings, for viewing all posts by a specific author. How does your plugin handle them? I would guess it’s handled through “Exclude from All Archives?”
I tried to solve my problem using a functions.php snippet for hiding a specific category from the front page:
function exclude_category_home( $query ) { if ( $query->is_front_page ) { $query->set( 'cat', '-3' ); } return $query; } add_filter( 'pre_get_posts', 'exclude_category_home' );
It works fine for the front page, but it excludes category 3 in my query on the profile page, the same way that your plugin does. Here’s my query in full:
<?php $current_user = wp_get_current_user(); $user_ID = $current_user->ID; // Query to show a specific Custom Field $the_query = new WP_Query( array( 'meta_key' => 'fetcher', 'meta_value' => $user_ID ) ); // The Loop while ( $the_query->have_posts() ) : $the_query->the_post(); the_title(); endwhile; wp_reset_postdata(); ?>
I thought that might help you understand if it’s my query or your plugin that needs an adjustment…?
- This reply was modified 1 year, 9 months ago by joxyzan.
Forum: Developing with WordPress
In reply to: Excluding a category on the frontpageThank you for answering @sterndata ! ??
Changing from is_home to is_front_page in my snippet didn’t make a difference though.
While lurking around I noticed that this other query on the same WPUM profile works correct:
$the_query = wpum_get_posts_for_profile( $data->user->ID );
While the one not working starts like this:
$the_query = new WP_Query( array( 'meta_key' => 'fetcher', 'meta_value' => $user_ID ) );
Might that be a clue?
Forum: Developing with WordPress
In reply to: Prefill the comment textareaThanks again @bcworkz , for taking your time to write clear och correct answers! ??
Forum: Developing with WordPress
In reply to: Change post category when a comment is postedSounds good @bcworkz ! The bad thing is I can’t write that code. (I’m in the very start of learning php…) Could you help me? ??
Would the hook be placed as an action in the functions.php? And is it possible to make it fire only when the first comment is made on a post in a certain category?The site I’m working on is available to logged in members of my association only, so all comments are automatically approved and considered valid for booking.
Forum: Developing with WordPress
In reply to: Prefill the comment textareaThanks @bcworkz , what I wanted though is to put the “Prewritten comment” followed by “the author” in the same comment.
I cant figure out how all punctuation marks (. , ‘ and __) works here… ??
Forum: Developing with WordPress
In reply to: Prefill the comment textareaThank you @bcworkz that worked great! ?
Could you maybe tell me how to echo <?php the_author(); ?> in the same prewritten comment? I can’t figure out where/how to place it to make it show in the comment.
Forum: Plugins
In reply to: [Da Reactions] Fade effect not visibleThank you for the swift response. ??
I wonder: Is the behaviour of the fade method i described the same for everyone?
Thank you for looking in to it, when there’s time.
PS. I should clarify that the warnings are shown on top of all WordPress backend pages, not only the ones related to the plugin.
Forum: Plugins
In reply to: [Admin Menu Editor] Warning: Array to string conversionThank your for a very quick and clear response! ??
I’ll wait for your update to get rid of the first warning and contact Da Reactions about the second warning.
Forum: Plugins
In reply to: [WP User Switch] Need search function for usersOn the same subject; I would really appreciate an option to see only my selection of users in the list. My site has 50 users but I only need to quickly switch between three of them.
At the moment I therefor have to use another combination of plugins (User Switching + Admin Bar User Switching) that happens to gives the sort of search function you request @normsash !
Forum: Themes and Templates
In reply to: [Gridzone] Hide toggle-search in mobile viewSolution with Additional CSS:
@media only screen and (max-width: 479px) { .toggle-search { display: none; }}
And considering my second post, ultimately I went for:.toggle-search { display: none; }
+ placed “https://domain.com/?s ” as a Custom Link in the menu.
Forum: Themes and Templates
In reply to: [Gridzone] Hide toggle-search in mobile viewCome to think of it… While we’re at it… I would actually like the search-thing to be placed with the menu items in desktop view as well – if possible. ??
Forum: Plugins
In reply to: [Emoji Settings] Request: choose Emoji/TwemojiThanks!
Yeah I guess my solution will work for half a year or so…. But by then I count on you fixing the Twemoji-switch! ??