juicyjuke
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Adding Link Buttons on pages(not posts)Some pages will have 4 different categoroy posts but the categories will have posts from their category
Thanks, I understand how to manually create buttons. What I’m trying to do is edit the query posts display posts as buttons so I dont have to manually go in myself and do it.
If I can just figure out how to properly edit the
Wp_Query
To display the post title link in the form of a buttons. A real button. Then ill be happy
Forum: Developing with WordPress
In reply to: Adding Link Buttons on pages(not posts)For example, instead of seeing a list of posts , and their features image when they enter a category, I would rather see an alphabetical list of post links in the form of buttons so they can just scroll down the ordered list of posts
Example:
Category : rooftop unitsDescription: troubleshooting Electrical parts for rooftop package units
Page content
Scroll the alphabetical list for the parts you need information onAon Controls
Anvil Capacitors
Anvil ignition boards
Branch Operator ControlsForum: Fixing WordPress
In reply to: Video thumbnail issues(content.php)ok im closing this. thanks again
Forum: Fixing WordPress
In reply to: Video thumbnail issues(content.php)hmm. ok! thanks
Forum: Fixing WordPress
In reply to: Stop duplicate images from postsThanks, that tutorial is instructing me how to prevent duplicate images in a post.
I’m trying to prevent an image from being used again once it’s been used once
Forum: Fixing WordPress
In reply to: Chrome not redirecting my siteThat works! Week of researching and I get answered in 2 seconds on this forum.
Having “rewriteEngine On”. Twice is ok? I was reading that wasn’t good but I don’t understand why
Forum: Fixing WordPress
In reply to: Thumbnail of post contentSo basically instead of the video playing when clicked…I want it to open up to the post page..only then the video will play when clicked .
Forum: Fixing WordPress
In reply to: Thumbnail of post contentYes a tiny representation of the content. Sorry I should of specified a bit more. Specifically I wanted this for video content.
A thumbnail of the video content, when clicked I wanted it to open up to the post page of the video instead of the video playing .
Forum: Developing with WordPress
In reply to: adding Pagination to a shortcodeOk great. I will seek them out. Thanks for the advice.
What I meant? Ok as in. Does the shortcode I created do things how WordPress normally does them. Using the proper functions etc etc.
Forum: Fixing WordPress
In reply to: Thumbnail of post contentThumbnail of post content
Forum: Developing with WordPress
In reply to: adding Pagination to a shortcodeok check it out.
Pagination works!!
One thing id like to know however. Is this within the rules of wordpress? Like. is think ok for wordpress site?
add_filter( 'category_description', 'do_shortcode'); function wpb_postsbycategory($atts) { extract( shortcode_atts( array( 'expand' => '', ), $atts) ); global $paged; if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } else if ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; } $posts_per_page = 10; $settings = array( 'showposts' => $posts_per_page, 'post_type' => 'post', 'category_name' => 'crazy-humorous-pictures, strange-news-stories, crazy-humorous-videos, crazy-funny-memes', 'orderby' => 'menu_order', 'order' => 'DESC', 'paged' => $paged ); $post_query = new WP_Query( $settings ); $total_found_posts = $post_query->found_posts; $total_page = ceil($total_found_posts / $posts_per_page); $list = '<ul class="postsbycategory widget_recent_entries">'; while($post_query->have_posts()) : $post_query->the_post(); if ( has_post_thumbnail() ) { $list .= '<a href="' . get_the_permalink() .'" rel="bookmark">' . get_the_title() . '</a></li>'; $list .= '<li>'; $list .= '<a href="' . get_the_permalink() .'" rel="bookmark">' . get_the_post_thumbnail($post_id, array( 500, 500) ) . '</a></li>'; } else { // if no featured image is found $list .= '<li><a href="' . get_the_permalink() .'" rel="bookmark">' . get_the_title() .'</a></li>'; $list .= '<li> '. get_the_content() .'</li>'; } endwhile; $list.= '</ul>'; if(function_exists('wp_pagenavi')) { $list .='<div class="page-navigation">'.wp_pagenavi(array('query' => $post_query, 'echo' => false)).'</div>'; } else { $list.=' <span class="prev-posts-links">'.get_previous_posts_link('<< Previous ').'</span> <span class="next-posts-links">'.get_next_posts_link(' Next >>', $total_page).'</span> '; } return $list; } // Add a shortcode add_shortcode('categoryposts', 'wpb_postsbycategory'); // Enable shortcodes in text widgets add_filter('widget_text', 'do_shortcode');Forum: Developing with WordPress
In reply to: adding Pagination to a shortcodeYes ok. Turn it into a function then call that function my desired page/s php file. Ok that makes sense now.
Also …
Be sure the wp-config.php of your test install has WP_DEBUG defined as true.
I know you have your own theme, but to avoid possible conflicts, your test installation should use the twentysixteen theme (or in general one theme earlier than the latest default theme) and no plugins. Setup a child theme of twentysixteen
Ok I have done most of this . WP debug to see if it’s true however I have not. I have not used twenty 16 as a test. Will underscores be just as good to test?
Also I may have not explained. Somewhere in the middle of my theme creating I added Bootstrap . Personally that might of been a mistake as it just adds for things for me to know lol
Forum: Developing with WordPress
In reply to: adding Pagination to a shortcodemakes all sense what you said. its just learning how to do it again. I started following a 24 part build your theme from scratch tutorial, and after the 7th lesson I got what I needed and went on from there. ive got work in between. what I need is a good book to knock it all into my head again. like even VB I forgot. at least I understand what things do. any suggestions on what to read in order to implement what you said? or maybe even send you a zip of all my code? id be willing to compensate for your time. email? I don’t have a whole bunch of code. very simple. well for someone like you at least.
its hard to explain how I know what I know already without understanding exactly how to do what you said. I find myself doing some things that require good experience yet not being able to do things that a beginner can do.
make sense?Forum: Developing with WordPress
In reply to: adding Pagination to a shortcodeIn case you’ve not done so, unless you’ve built your own theme, you should create a child theme to contain all of your custom work. Otherwise your work will be lost when a theme is updated.
Yes I have other content. Under the main header nav I have 4 categories showing the latest featured image from each category in a row. I have built it from scratch. well using tutorials etc. However Im afraid my main problem here is understanding programming again, and foremost. learning wordpress functions and what they do. I might need to pick up a good book. I used to code basic, VB, vb-scriot, html when I was 14-16 using anglefire. but..i haven’t done anything since. now its over 20 years later. lmao.
- This reply was modified 9 years, 1 month ago by juicyjuke.
Forum: Developing with WordPress
In reply to: adding Pagination to a shortcodeso basically I have to start from scratch. I need the latest posts from 4 categories to be displayed on my home page.
10 per page, and then paginated. I want everyone to be able to find a post that’s interesting instead of manually going to each category one at time to find something interesting.