Connor Crosby
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Use $variable to fill in wp_query post_typeI ended up finding an alternate route. Thanks though for your help!
Forum: Developing with WordPress
In reply to: Use $variable to fill in wp_query post_typeDoesn’t seem to work. Keep in mind that $work_link is a custom field (which links to a YouTube link).
Basically I’m looking for a piece of code that let’s me make an variable = PHP code so that when I call
$work_link
it will execute the PHP codethe_field('video_link');
and grab the custom field from the post rather than just echothe_field('video_link');
. Make sense?Forum: Developing with WordPress
In reply to: Use $variable to fill in wp_query post_typeFor
$work_link
I need it to bethe_field('video_link');
and not justvideo_link
– how do I do this?$work_link = the_field('video_link');
and<?php $work_link ?>
doesn’t seem to be working.Forum: Developing with WordPress
In reply to: Use $variable to fill in wp_query post_type@burria In case you didn’t see my edit I fixed the issue.
@csloisel yes, exactly, I need the editor content to display other information – otherwise I would just use an archive.
Basically, depending on which page is showing, I would like the variable to change. So if the videos page is showing then
$thumb
should show<?php the_post_thumbnail( 'video-thumb' ); ?>
However now that I write this I realize I can just do something like<?php the_post_thumbnail( $thumb ); ?>
and have the variable =video-thumb
. Thoughts?Forum: Developing with WordPress
In reply to: Use $variable to fill in wp_query post_typeDoesn’t work. Probably because it has to be in quotes.
Edit: It does work! I had mistyped the post_type – it is
videos
notvideo
.- This reply was modified 7 years, 8 months ago by Connor Crosby.
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Changing sort orderI answered my own question – I changed the order to
order="ASC"
I guess I looked past this last night when using it.
Edit: yes, thanks!
- This reply was modified 7 years, 8 months ago by Connor Crosby.
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Changing sort orderIs there a reverse menu order? For some reason when I create a new post it puts it at the bottom unless I drag it all the way to the top.
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Changing sort orderPerfect, thank you!
Forum: Themes and Templates
In reply to: Loading jQuery correctly causes JS issuesAny ideas anyone?
Forum: Themes and Templates
In reply to: If else, show 404 pageTo clarify, right now if I were to visit an empty category, it shows the
<?php else : ?>
section of the loop on index.php. I was wondering if I can have it show the 404.php file instead?Forum: Themes and Templates
In reply to: query_posts for categoryThat seemed to do the trick! Thank you very much for your help.
Forum: Themes and Templates
In reply to: Custom Post Type Not Workingbump
Forum: Themes and Templates
In reply to: Removing image in Minimatica theme posts.Well every theme is different. I suggest you contact the theme author to see if he can help you.
Forum: Themes and Templates
In reply to: Warm-Home Theme Picture HelpHow much do you know about coding? I’m guessing not so much, which is fine ??
See where it says
<img src="<?php echo get_template_directory_uri('template_directory'); ?>/images/pic02.jpg" alt="advert2" />
? That’s the code that displays the image.src="path/to/image.jpg"
is where the image lives. It will take that and display it on the site. To replace the image to what you want, you can upload it using the Media tool inside the WordPress dashboard. Then take the link to the image and paste it into the src quotes.alt="title"
is what’s displayed if the image is not found. So you usually want to put a simple title or summary of the image. So if you have a picture of a tree, you could put “tree” in the alt quotes.Hopefully that helps!
EDIT: if you do use the media tool to upload the image, make sure to remove
<?php echo get_template_directory_uri('template_directory'); ?>
from the src quotes.Forum: Themes and Templates
In reply to: Warm-Home Theme Picture HelpAlright, if you open up sidebar.php you can look for the images there. They will be in a
div
with a class of “advert”.