r99photography
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Edit plugin functions within a declared classI had not thought it was so difficult getting an answer. So let’s detail my question: Is it possible extend a plugin using its class and methods, even if hooks are not available, or not in the position I wanna extend or modify?
I am sorry but it does not matter which plugin I referred to, it could name Pippolo, Plutolo, Bombolo or Crnerentolo.
In the case above, there are dozens of other methods along with the one I had showed. No do_action nor apply_filters there, only some add_action which refers to a function who collects all options established by the methods class.
Thank you, I think it is better to search elsewhere.- This reply was modified 7 years, 10 months ago by r99photography.
- This reply was modified 7 years, 10 months ago by r99photography.
they don’t supply support to customers of VC within WP themes… JUST RIDI!!!
i have already written they don’t supply.
their documentation is absolute lacking of.
MERRY XMAS 2017.- This reply was modified 7 years, 10 months ago by r99photography.
- This reply was modified 7 years, 10 months ago by r99photography.
Forum: Fixing WordPress
In reply to: Custom type post menu shows standard blog postHello Jacob,
thanks for your reply. The Portfolio menu comes through a wordpress theme I bought.
Anyway, it does not matter this way because I have just tried on a fresh WP installation and got the same issue.
Just for your information, I installed a fresh copy of WP v4.7, I then added this snippet code to the functions.php file:// Register custom post type "Gallery" add_action('init', 'custom_post_type_callback'); function custom_post_type_callback(){ $args = array ( 'public' => true, 'label' => 'Gallery', 'has_archive' => true, 'rewrite' => array('slug' => 'gallery'), 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'comments', 'revision'), ); register_post_type('gallery', $args); } // Add an existing taxonomies to custom post type "Gallery" add_action('init', 'add_taxonomies_gallery_callback'); function add_taxonomies_gallery_callback(){ register_taxonomy_for_object_type('post_tag', 'gallery'); register_taxonomy_for_object_type('category', 'gallery'); } // Output Gallery posts in the archive page add_filter ('pre_get_posts', 'add_gallery_posts_query_callback'); function add_gallery_posts_query_callback($query){ if ( is_archive() && $query->is_main_query() ) { $query->set('post_type', array ( 'post', 'gallery') ); } }
Maybe something wrong with the above snippet? I am not an expert, I must say, just followed one of many articles there are on the net about this task.
This is the screenshot of Posts menu page:
https://drive.google.com/open?id=0B-DXE7ThxZ20MWFaSFlBU3lwMXMThis is the screenshot of Gallery menu page:
https://drive.google.com/open?id=0B-DXE7ThxZ20UGdibW5HQkZDaEEAs you can see, in the latter there are 4 posts: two in red are the standard blog posts (as seen in the previous image), two in blue are the custom type posts called “Gallery”. Note also that under the page title is reported the current view should have only 2 published posts, but the query output 4 items.
I guess something is wrong in the function add_gallery_posts_query_callback I wrote above.
Thanks if you may help me.
Bye.Riccardo
Forum: Fixing WordPress
In reply to: Extending plugin custom admin optionsIt is an input field (option) to completely override (or not) html markup of of shortcode.
Ok, I guess it is not possible without asking the developer… Very good.
Thank you.Forum: Plugins
In reply to: edit functions of Post Views CounterThank you.
Forum: Plugins
In reply to: edit functions of Post Views CounterThe function I wanna edit is the following. In particular, the $html variable, where are some CSS classes, divs and spans:
if ( ! function_exists( 'pvc_post_views' ) ) { function pvc_post_views( $post_id = 0, $echo = true ) { // get all data $post_id = (int) ( empty( $post_id ) ? get_the_ID() : $post_id ); $options = Post_Views_Counter()->options['display']; $views = pvc_get_post_views( $post_id ); // prepares display $label = apply_filters( 'pvc_post_views_label', (function_exists( 'icl_t' ) ? icl_t( 'Post Views Counter', 'Post Views Label', $options['label'] ) : $options['label'] ), $post_id ); $icon_class = ($options['icon_class'] !== '' ? ' ' . esc_attr( $options['icon_class'] ) : ''); $icon = apply_filters( 'pvc_post_views_icon', '<span class="post-views-icon dashicons ' . $icon_class . '"></span>', $post_id ); $html = apply_filters( 'pvc_post_views_html', '<div class="post-views post-' . $post_id . ' entry-meta"> ' . ($options['display_style']['icon'] && $icon_class !== '' ? $icon : '') . ' ' . ($options['display_style']['text'] ? '<span class="post-views-label">' . $label . ' </span>' : '') . ' <span class="post-views-count">' . number_format_i18n( $views ) . '</span> </div>', $post_id, $views, $label, $icon ); if ( $echo ) echo $html; else return $html; } }
In this function, as far I understand, the hook to be called by the add_filter() function is “pvc_post_views_html”, do you confirm?
Unfortunately, I don’t know how to proceed.
Thanks to whom will help me.Bye.
RiccardoForum: Plugins
In reply to: [Post Views Counter] Display only the number of views without ANY classThank you, But i cannot do any of those. I don’t know how use hooks and the function you write in your doc does not work on my side. I will searching for anorher plugin.
Thank you for your very helping answer.Forum: Plugins
In reply to: [Post Views Counter] How to insert manual code on single.phpHello,
Thanks for that php code, I am also interested to add this feature manually into templates. Did you try to use the do_shortcode() function, which usually runs correctly the shortcode?
Just to know, where did you fin the php code to use in place of the shortcode? Thank you.Riccardo
Forum: Fixing WordPress
In reply to: Cloudflare CDN / Images served by a subdomainHello Steve,
Thanks for your reply, but I cannot understand why, despite using CDN, I don’t need setup a subdomain for serving images, if this could help when downloading static assets in a parallel way.
I think they are two different solutions for speeding up the website, if so, they are one he alternative of the other, but they could coexist.
I am a little bit confused, sorry.Regards,
Riccardo.Forum: Fixing WordPress
In reply to: Random background image along with child themeEDIT:
Ok, for someone also interested in.
Looking at Nathan Ingram blog and Dan Benjamin’s post here, I got the solution.
So, recap.1. Create in the Child Theme (if available on your theme WP installation) a folder called something like: CUSTOM_LOGIN
2. Put within: a) your customized logo, b) the CSS stylesheet, c) a folder with backgrounds and ROTATE.php file. The code of Rotate.php file is on links provided above.
3. In your custom CSS stylesheet point the background image to ROTATE.PHP using this simple code:.classe-name {background: url(backgrounds/rotate.php);}
I don’t know if the code in rotate.php is good or not, too much complex or not, but in my case It works effectively.
Thanks, hope to be useful to other guys in my same situation.
Bye.Riccardo
Forum: Fixing WordPress
In reply to: Random background image along with child themeHello Jacob and thanks for your reply.
Unfortunately, your suggestion does not fit my needs. I should edit the file responsible for login, which changes every time a new wordpress core engine being released.
For that reason, I want to use the functions.php file in the child theme and the respective CSS stylesheet.
I am sorry, but it is not good for me.Thanks.
Bye.Riccardo
Forum: Fixing WordPress
In reply to: many spam users registration without any registration pageHello Jacob,
Ok I got that, the membership setting is checked indeed. Thanks for clarification.Bye.