Managing WordPress Theme

PSD files are typically included with premium themes as an extra to allow you to customize the image assets. You have to open those files in Photoshop, edit them, and export new versions to replace the png, gif, or jpg assets that came with the theme. There’s nothing in WordPress core that deals with PSD … Read more

get_pages() Returns Only One Item

Your problem is in this section foreach( $voc_pages as $voc_page ) { $voc_link = ‘<a href=”‘.get_page_link( $voc_page->ID ).'”>’.$voc_page->post_title.'</a>’; return $voc_link; } You return $voc_link after just the first iteration, stopping the function and returning its value. You should take return $voc_link; outside your foreach loop, and probably save your links as an array Change the … Read more

Get title attribute from galleries

WordPress actually uses a Built-in Post Type for Attachments ( called attachment ) so you can use some of the same functions like get_the_title() which is what you’re looking for. Though, I did take some liberties by modifying your code below, using a foreach instead of a for loop: $gallery = get_post_gallery( 7, false ); … Read more

Theme not showing up

Please learn how to template for WordPress first, before proceeding further. It will help you understand how you are proceeding and what you are achieving. Please note what is the Minimal requirement for a theme to BE a ‘theme’: index.php (not index.html) style.css That’s it. It will work like a complete theme, and you can … Read more

How to add a class to edit_post_link?

Assuming you are reading this answer in the future (December 2015 or later). Starting from WordPress 4.4.0, The $class argument was added. So: edit_post_link( __(‘Edit’), ”, ”, 0, ‘post-edit-link btn btn-default’ ); See edit_post_link documentation.