dragongamer54
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Paloma FSE] Child theme of FSE theme cannot access is_pageI ended up creating a different child theme based on twentytwentyone. The main take from this child theme is that I used some files like
footer.php
in the root directory of the theme where I am able to handle functions from function.phpThanks bradvin, that did the trick!
This is the source code on how to show the latest 6 media images added to a wordpress website:
Place this in your custom-theme-template file:<?php $args = array( 'post_type' => 'attachment', 'numberposts' => 6, 'post_status' => null ); $attachments = get_posts( $args ); if ( $attachments ) { ?> <div id="foogallery-gallery-000" class="foogallery-container foogallery-default foogallery-link-image foogallery-lightbox-foobox-free spacing-width-25 hover-effect-zoom border-style-square-white alignment-center fbx-instance"> <?php foreach ( $attachments as $attachment ) { ?><a href="<?php echo wp_get_attachment_image_src($attachment->ID, 'full')[0]; ?>" data-attachment-id="<?php echo $attachment->ID ?>" class="fbx-link"><img src="<?php echo cropped_image($attachment->ID); ?>" width="210px" height="210px"></a><?php } ?> <div style="clear:both"></div> </div> <?php } ?>
Place this in your function.php file:
function cropped_image($attachment){ $image_url = wp_get_attachment_image_src($attachment, 'full')[0]; $args = array( 'width' => 300, 'height' => 300, 'crop' => true ); return wpthumb( $image_url , $args ); }
Note that this code only works if you include the foogallery stylesheet in your theme.
I tried using this filter in my functions.php file:
add_filter( 'wp_get_attachment_image_src' , 'foogallery_attachment_html_image', 10 , 2 );
However I’m fairly new in using filters and this filter doesn’t return any results to my website.
I get my image url’s through the following code:
wp_get_attachment_image_src($attachment->ID, 'full')[0]
Forum: Plugins
In reply to: [Event Organiser] WP 4.2.2 issues: categories, Google MapsFiltering works again, thanks!
This is really a great plugin! Thanks for all your efforts Stephen ^^
Forum: Plugins
In reply to: [Event Organiser] WP 4.2.2 issues: categories, Google MapsJust to let you guys know.
I’m also having the same issue that Phoros describes as his first issue.I don’t think it’s a plugin conflict. Deactivating all other plugins except from the event organizer plugin did not fix the filtering for the categories or vanues.
Forum: Plugins
In reply to: [WP-Print] Do_shortcode ignoredHey Lester
Thanks for the fast response. I think I’ll go for the second method.
Do you also have a suggestion/solution for do_shortcode’s in multiple different theme files?
Forum: Plugins
In reply to: [Event Organiser] archive-event.php in theme doesn't override the plugin oneEdit: I was looking in the wrong file. I should have looked in the ‘shortcode-event-list.php’ file. My bad, I fixed it now.
Hi
I have exactly the same issue here.
Kind regards
Hey guys
I read somewhere the solution for this problem might be overriding the execution time of the script in the php file itself?
This is maybe the solution: https://davidwalsh.name/increase-php-script-execution-time-limit-ini_set
I dont know for sure. I’m just trying to help. I’m also having the same issue.
Forum: Themes and Templates
In reply to: Only show sidebar when subpagesOmg, Sorry for posting the earlier thread. The solution was so simple!
This is what I did (for those having the same problem).I only changed the order of the code. My code is now as follows:
<?php if(!$post->post_parent){ // will display the subpages of this top level page $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); }else{ // diplays only the subpages of parent level //$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); if($post->ancestors) { // now you can get the the top ID of this page // wp is putting the ids DESC, thats why the top level ID is the last one $ancestors = end($post->ancestors); $children = wp_list_pages("title_li=&child_of=".$ancestors."&echo=0"); // you will always get the whole subpages list } } if ($children) { ?> <div id="sidebar"> <ul> <li> <div style="clear: both;"> </div> </li> <li> <ul> <?php echo $children; ?> </ul> </li> <li> </li> </ul> </div> <?php } ?>
Forum: Fixing WordPress
In reply to: Content doesn't display in own made themeI took a look again at the original HTML source of my theme and cleaned up some code. After that I restarted creating the theme and it’s working like a charm now!
Thanks for the help!
Greetings dragongamer54
Forum: Fixing WordPress
In reply to: Content doesn't display in own made themeIt seems that when I make 1 post in WordPress it displays properly (on all pages).
But my WordPress setup consist only out of pages…
I’ve searched in the wordpress codex again, numerous times, but nothing seems to indicate the solution to my problem.Thanks again in advance for any help!
Forum: Fixing WordPress
In reply to: Content doesn't display in own made themeDoes no one else have any idea on this topic?
PS: Happy new year everybody ??
Forum: Fixing WordPress
In reply to: Content doesn't display in own made themeAs of the latest change to my code. Nothing is showing anymore its just showing me a blank content space.
With the old code I was still able to see the title of the page in that content area.
I don’t have a Live working website. It’s local (via Xampp).
Forum: Fixing WordPress
In reply to: Content doesn't display in own made themeOk, so my code in the index.php file is something like this now. But it is still not working.
<?php get_header(); ?> <div id="page"> <div id="page-bgtop"> <div id="page-bgbtm"> <div id="content"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h2 class="title"><?php the_title(); ?></h2> <div style="clear: both;"></div> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <?php endwhile; ?> <?php endif; ?> </div> </div> <!-- End #content --> <?php get_sidebar(); ?> <?php get_footer(); ?>