Stephan Nijman
Forum Replies Created
-
I would really like to knwo this too!? Did you find a solution yet?
Forum: Fixing WordPress
In reply to: Set default state to edit for custom gallery blockHahah. Nope this is the first time :p But thank you. Your very kind.
Forum: Fixing WordPress
In reply to: Set default state to edit for custom gallery blockYou have to add ‘mode’ => ‘edit’ to the settings array. And if i’m not mistaken the function to use is acf_register_block_type() not acf_register_block()!? See https://www.advancedcustomfields.com/resources/acf_register_block_type/
Forum: Fixing WordPress
In reply to: Not able to change the background color on mobile-menuThe css for the menu is a inline style:
#slide-out-widget-area, #slide-out-widget-area-bg.fullscreen { background-color: #27CCC0 !important; }
Because it is inlined there might be a setting somewhere in your WordPRess admin!? Maybe check out the customizer (Appearance > Customize)? Or maybe the side menu is a plugin that has some settings?
Forum: Fixing WordPress
In reply to: Div slider with buttonsIf you want to go the “code it yourself” route i can recommend taking a look at SwiperJs https://swiperjs.com/ Take a look at the demo’s they should be pretty easy to implement. I think this demo meant your needs. https://swiperjs.com/demos/210-infinite-loop-with-slides-per-group.html
Hi @berserk77,
Do you want to check the referer link? In that case you can read the $_SERVER[‘HTTP_REFERER’] value and act on that.
If your site excepts multiple domain names and you want to change content based on that domain you can check the $_SERVER[‘SERVER_NAME’] value.
Hope that helps,
Stephan
Forum: Developing with WordPress
In reply to: Form page $_POST deactivation on page reloadHi @antonop4u,
You can look into using this javascript snippet:
<script> if ( window.history.replaceState ) { window.history.replaceState( null, null, window.location.href ); } </script>
https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
But I would recommend that you redirect the user to a new page after you processed the $_Post values. That way the post values don’t get resend on refresh.
Forum: Fixing WordPress
In reply to: More Freedom with menus and textForum: Fixing WordPress
In reply to: More Freedom with menus and textHey @abhi_bangal,
I dont know about your first question, but for the font inside the list blocks i think the Editors Kit plugin will help you out!? https://editorskit.com/
Forum: Developing with WordPress
In reply to: Redirect users from register page if loggedHey @cienfu90,
Did you change the url’s inside my code example? the “/regsiter” and the “/some-other-url”? You may need to add a slash at the end like so “/regsiter/”!
Forum: Developing with WordPress
In reply to: How do you get the post thumbnail ?Hey @graphirancom,
in your example the ‘images_posts’ string represents the size of the image.
You can change this string to any registered thumbnail size name. or you can set it to ‘thumbnail’ to use the default thumbnail size.$image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_id() ), 'thumbnail' );
Regards,
Stephan
- This reply was modified 5 years, 3 months ago by Stephan Nijman.
Forum: Developing with WordPress
In reply to: Featured Image Not Showing in Custom Post TypesHey @sunilkumarthz,
You can try adding this below the register_post_type function:
add_post_type_support( 'themes', 'thumbnail' );
Let me know if this works for you.
Stephan
Forum: Developing with WordPress
In reply to: Redirect users from register page if loggedHey @cienfu90
The simplest way is to just add it at the top of you register template file.
Or you can add it to your functions php like so:
add_action('after_setup_theme' , function() { if( $_SERVER['REQUEST_URI'] == '/register' && is_user_logged_in() ) { wp_redirect('/some-other-url'); } });
Change /register and /some-other-url to the required slugs/url.
Let me know if this works for you.
Stephan
- This reply was modified 5 years, 3 months ago by Stephan Nijman.
Forum: Developing with WordPress
In reply to: Redirect users from register page if loggedIn php your can use something like this:
if( is_user_logged_in() ) { wp_redirect('/some-other-url'); }
- This reply was modified 5 years, 3 months ago by Stephan Nijman.
Hey,
If you want the author names to link to their profile page (author.php) you need to change the post template (probably single.php).
– Copy the single.php template to your child theme like bcworkz explained.
– Find the place where the author name is printed. Should be something like<?php the_author(); ?>
– Change that output to something like:<a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>">By <?php the_author(); ?></a>
That should change the static names you have now to a clickable link to the authors profile.
- This reply was modified 5 years, 3 months ago by Stephan Nijman.